File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -916,6 +916,7 @@ def compile_action_configs(
916916 swift_toolchain_config .action_config (
917917 actions = [
918918 swift_action_names .COMPILE ,
919+ swift_action_names .DERIVE_FILES ,
919920 ],
920921 configurators = [swift_toolchain_config .add_arg ("-static-stdlib" )],
921922 features = [SWIFT_FEATURE_STATIC_STDLIB ],
Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ def _swift_linkopts_cc_info(
133133 toolchain_label: The label of the Swift toolchain that will act as the
134134 owner of the linker input propagating the flags.
135135 toolchain_root: The toolchain's root directory.
136+ static_stdlib: Whether to statically link Swift standard libraries.
136137
137138 Returns:
138139 A `CcInfo` provider that will provide linker flags to binaries that
@@ -161,9 +162,7 @@ def _swift_linkopts_cc_info(
161162 static_stdlib_args = "{platform_lib_dir}/static-stdlib-args.lnk" .format (
162163 platform_lib_dir = platform_lib_dir ,
163164 )
164- linkopts += [
165- "@{}" .format (static_stdlib_args ),
166- ]
165+ linkopts .append ("@{}" .format (static_stdlib_args ))
167166
168167 runtime_object_path = "{platform_lib_dir}/{cpu}/swiftrt.o" .format (
169168 cpu = cpu ,
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ void WorkProcessor::ProcessWorkRequest(
6363 OutputFileMap output_file_map;
6464 std::string output_file_map_path;
6565 bool is_wmo = false ;
66+ bool is_static_stdlib = false ;
6667 bool is_dump_ast = false ;
6768
6869 std::string prev_arg;
@@ -77,6 +78,8 @@ void WorkProcessor::ProcessWorkRequest(
7778 } else if (prev_arg == " -output-file-map" ) {
7879 output_file_map_path = arg;
7980 arg.clear ();
81+ } else if (arg == " -static-stdlib" ) {
82+ is_static_stdlib = true ;
8083 } else if (ArgumentEnablesWMO (arg)) {
8184 is_wmo = true ;
8285 }
@@ -88,7 +91,7 @@ void WorkProcessor::ProcessWorkRequest(
8891 prev_arg = original_arg;
8992 }
9093
91- bool is_incremental = !is_wmo && !is_dump_ast;
94+ bool is_incremental = !is_wmo && !is_dump_ast && !is_static_stdlib ;
9295
9396 if (!output_file_map_path.empty ()) {
9497 if (is_incremental) {
You can’t perform that action at this time.
0 commit comments