mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00
[releng] Return exit code from GCC in wrapper
Change-Id: I73ce7fb4cb58b25809359f3bc8e805704737b7d8 Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
This commit is contained in:
parent
f2dcc3dff3
commit
9a440e0b44
1 changed files with 6 additions and 2 deletions
|
@ -54,7 +54,11 @@ except ValueError:
|
||||||
|
|
||||||
# Preprocess the source file(s)
|
# Preprocess the source file(s)
|
||||||
debug("Preprocess cmd: {}".format(preprocess_command))
|
debug("Preprocess cmd: {}".format(preprocess_command))
|
||||||
data = subprocess.check_output(preprocess_command)
|
try:
|
||||||
|
data = subprocess.check_output(preprocess_command)
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
print("Failed to hash source code, exit code {}".format(e.returncode))
|
||||||
|
sys.exit(e.returncode)
|
||||||
|
|
||||||
# Hash the content
|
# Hash the content
|
||||||
sha1.update(data)
|
sha1.update(data)
|
||||||
|
@ -65,4 +69,4 @@ os.environ["SOURCE_DATE_EPOCH"] = str(int(sha1.hexdigest(), base=16) % LONG_MAX)
|
||||||
debug("SOURCE_DATE_EPOCH: {}".format(os.environ["SOURCE_DATE_EPOCH"]))
|
debug("SOURCE_DATE_EPOCH: {}".format(os.environ["SOURCE_DATE_EPOCH"]))
|
||||||
|
|
||||||
# Run the compiler with the environement variable set
|
# Run the compiler with the environement variable set
|
||||||
subprocess.run(compiler_command)
|
sys.exit(subprocess.run(compiler_command).returncode)
|
||||||
|
|
Loading…
Add table
Reference in a new issue