File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,12 @@ endif()
75
75
# NOTE: Some of these variables are also initialized in StandaloneOverlay.cmake
76
76
# so that interfaces are emitted when overlays are separately built.
77
77
78
+ set (SWIFT_STDLIB_EXTRA_SWIFT_COMPILE_FLAGS "" CACHE STRING
79
+ "Extra flags to pass when compiling swift stdlib files" )
80
+
81
+ set (SWIFT_STDLIB_EXTRA_C_COMPILE_FLAGS "" CACHE STRING
82
+ "Extra flags to pass when compiling C/C++ stdlib files" )
83
+
78
84
option (SWIFT_STDLIB_STABLE_ABI
79
85
"Should stdlib be built with stable ABI (library evolution, resilience)."
80
86
"${SWIFT_STDLIB_STABLE_ABI_default} " )
Original file line number Diff line number Diff line change @@ -367,6 +367,8 @@ function(_add_target_variant_c_compile_flags)
367
367
list (APPEND result "-DSWIFT_STDLIB_SUPPORTS_BACKTRACE_REPORTING" )
368
368
endif ()
369
369
370
+ list (APPEND result ${SWIFT_STDLIB_EXTRA_C_COMPILE_FLAGS} )
371
+
370
372
set ("${CFLAGS_RESULT_VAR_NAME} " "${result} " PARENT_SCOPE )
371
373
endfunction ()
372
374
Original file line number Diff line number Diff line change @@ -506,6 +506,8 @@ function(_compile_swift_files
506
506
list (APPEND swift_flags "-experimental-hermetic-seal-at-link" )
507
507
endif ()
508
508
509
+ list (APPEND swift_flags ${SWIFT_STDLIB_EXTRA_SWIFT_COMPILE_FLAGS} )
510
+
509
511
list (APPEND swift_flags ${SWIFT_EXPERIMENTAL_EXTRA_FLAGS} )
510
512
511
513
if (SWIFTFILE_OPT_FLAGS )
You can’t perform that action at this time.
0 commit comments