File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -2346,6 +2346,17 @@ function(_add_swift_executable_single name)
2346
2346
target_link_libraries ("${name} " PRIVATE ${SWIFTEXE_SINGLE_LINK_LIBRARIES} )
2347
2347
swift_common_llvm_config ("${name} " ${SWIFTEXE_SINGLE_LLVM_LINK_COMPONENTS} )
2348
2348
2349
+ # NOTE(compnerd) use the C linker language to invoke `clang` rather than
2350
+ # `clang++` as we explicitly link against the C++ runtime. We were previously
2351
+ # actually passing `-nostdlib++` to avoid the C++ runtime linkage.
2352
+ if (SWIFTEXE_SINGLE_SDK STREQUAL ANDROID )
2353
+ set_property (TARGET "${name} " PROPERTY
2354
+ LINKER_LANGUAGE "C" )
2355
+ else ()
2356
+ set_property (TARGET "${name} " PROPERTY
2357
+ LINKER_LANGUAGE "CXX" )
2358
+ endif ()
2359
+
2349
2360
set_target_properties (${name} PROPERTIES FOLDER "Swift executables" )
2350
2361
endfunction ()
2351
2362
You can’t perform that action at this time.
0 commit comments