Commit 3930a6ef authored by Zeyi (Rice) Fan's avatar Zeyi (Rice) Fan Committed by Facebook GitHub Bot

teach getdeps to look for clang on macOS with xcrun in boost build

Reviewed By: wez

Differential Revision: D22528869

fbshipit-source-id: 66c394b6fafcc45503b593f9f6b0605b5578ce56
parent 790557fb
...@@ -802,8 +802,16 @@ class Boost(BuilderBase): ...@@ -802,8 +802,16 @@ class Boost(BuilderBase):
linkage = ["static"] linkage = ["static"]
if self.build_opts.is_windows(): if self.build_opts.is_windows():
linkage.append("shared") linkage.append("shared")
for link in linkage:
args = [] 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:
if self.build_opts.is_windows(): if self.build_opts.is_windows():
bootstrap = os.path.join(self.src_dir, "bootstrap.bat") bootstrap = os.path.join(self.src_dir, "bootstrap.bat")
self._run_cmd([bootstrap], cwd=self.src_dir) self._run_cmd([bootstrap], cwd=self.src_dir)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment