Skip to content

Commit 7e439ee

Browse files
committed
[cmake] For now when compiling host swift code into a library, put -gnone to prevent the driver from running dsymutil on static libraries.
Work around for this problem until rdar://78271443 (which tracks the underlying issue) lands so this no longer happens.
1 parent ae7e301 commit 7e439ee

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,12 @@ function(add_swift_host_library name)
519519
target_link_options(${name} PRIVATE
520520
"LINKER:-current_version,${SWIFT_COMPILER_VERSION}")
521521
endif()
522+
523+
# For now turn off in swift targets, debug info if we are compiling a static
524+
# library.
525+
if (ASHL_STATIC)
526+
target_compile_options(${name} PRIVATE $<$<COMPILE_LANGUAGE:Swift>:-gnone>)
527+
endif()
522528
endif()
523529
524530
add_dependencies(dev ${name})

0 commit comments

Comments
 (0)