Skip to content

Commit

Permalink
teach getdeps to look for clang on macOS with xcrun in boost build
Browse files Browse the repository at this point in the history
Reviewed By: wez

Differential Revision: D22528869

fbshipit-source-id: 66c394b6fafcc45503b593f9f6b0605b5578ce56
  • Loading branch information
fanzeyi authored and facebook-github-bot committed Jul 15, 2020
1 parent f9e385f commit d90ddb5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion build/fbcode_builder/getdeps/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,16 @@ def _build(self, install_dirs, reconfigure):
linkage = ["static"]
if self.build_opts.is_windows():
linkage.append("shared")

args = []
if self.build_opts.is_darwin():
clang = subprocess.check_output(["xcrun", "--find", "clang"])
user_config = os.path.join(self.build_dir, "project-config.jam")
with open(user_config, "w") as jamfile:
jamfile.write("using clang : : %s ;\n" % clang.decode().strip())
args.append("--user-config=%s" % user_config)

for link in linkage:
args = []
if self.build_opts.is_windows():
bootstrap = os.path.join(self.src_dir, "bootstrap.bat")
self._run_cmd([bootstrap], cwd=self.src_dir)
Expand Down

0 comments on commit d90ddb5

Please sign in to comment.