Skip to content

Commit 9ddc761

Browse files
mparkfacebook-github-bot
authored andcommitted
Specify -fmodule-file-home-is-cwd to the module builds.
Summary: This diff specifies `-fmodule-file-home-is-cwd` flag which allows to produce relocatable PCMs without the internal patch from T32246672. In the current state and our use of Clang, this flag ends up just being ignored. However, in the rollout of Clang with the internal patch reverted and [llvm#135147](llvm/llvm-project#135147) backported, it will end up having the same effect of storing relative paths in PCMs as before. Reviewed By: dmpolukhin Differential Revision: D72999617 fbshipit-source-id: 222857daebed514951c72882e46b0c6478938544
1 parent 4af17dd commit 9ddc761

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: prelude/cxx/compile.bzl

+1
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,7 @@ module "{}" {{
736736
args.extend([cmd_args(headers_argsfile, format = "@{}")])
737737
args.extend(["-xc++-user-header", "-fmodule-header"])
738738
args.extend(["-fmodule-name={}".format(module_name)])
739+
args.extend(["-Xclang", "-fmodule-file-home-is-cwd"])
739740
args.extend(["-Xclang", cmd_args(input_header, format = "-fmodules-embed-file={}")])
740741
args.extend(["--precompile", input_header])
741742

0 commit comments

Comments
 (0)