Commit 8faaa1a9 authored by Adam Simpkins's avatar Adam Simpkins Committed by Facebook Github Bot

fbcode_builder: fix run_cmake.py to propagate the command return code

Summary:
Update the generated `run_cmake.py` script to use `os.execve()` rather than
`subprocess.call()`, so that it now propagates CMake's return code back to its
caller.

Reviewed By: chadaustin

Differential Revision: D17089206

fbshipit-source-id: e01f05f492ccb842d4967e59fd0bc9a3e59b8a42
parent 74aeab1c
...@@ -200,7 +200,6 @@ from __future__ import absolute_import, division, print_function, unicode_litera ...@@ -200,7 +200,6 @@ from __future__ import absolute_import, division, print_function, unicode_litera
import argparse import argparse
import os import os
import subprocess
CMAKE = {cmake!r} CMAKE = {cmake!r}
SRC_DIR = {src_dir!r} SRC_DIR = {src_dir!r}
...@@ -266,7 +265,8 @@ def main(): ...@@ -266,7 +265,8 @@ def main():
cmd_str = " ".join(full_cmd) cmd_str = " ".join(full_cmd)
print("Running: %r" % (cmd_str,)) print("Running: %r" % (cmd_str,))
subprocess.call(full_cmd, env=env, cwd=BUILD_DIR) os.chdir(BUILD_DIR)
os.execve(CMAKE, full_cmd, env)
if __name__ == "__main__": if __name__ == "__main__":
......
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