File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -445,6 +445,19 @@ def compile_action_configs(
445445 #### Flags controlling how Swift/Clang modular inputs are processed
446446
447447 action_configs += [
448+ # When `-g` is passed to the compiler, the driver will pass
449+ # `-file-compilation-dir <CWD>` to the frontend, which in turn passes
450+ # `-ffile-compilation-dir <CWD>` to Clang. This CWD is fully resolved so
451+ # it contains the absolute path to the workspace. If we pass
452+ # `-file-compilation-dir .`, then the driver/frontend preserve that
453+ # spelling, ensuring that the ClangImporter options section of the
454+ # `.swiftmodule` file is hermetic.
455+ ActionConfigInfo (
456+ actions = all_compile_action_names (),
457+ configurators = [
458+ add_arg ("-file-compilation-dir" , "." ),
459+ ],
460+ ),
448461 # Explicitly set the working directory to ensure that the
449462 # `FILE_SYSTEM_OPTIONS` block of PCM files is hermetic.
450463 #
You can’t perform that action at this time.
0 commit comments