Skip to content

Commit a1fc965

Browse files
authored
Merge pull request #43 from AngryLoki/fail-build
Fail if bitcode compilation fails
2 parents e105228 + c63af2b commit a1fc965

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

scripts/bitcodes/compile.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ def compileScript(cmd, dst):
5858
return_code = subprocess.call(cmd, shell=True)
5959
if return_code != 0:
6060
print(errorMessageHeader + ' executing command: ' + cmd)
61+
sys.exit(1)
6162
elif not os.path.exists(dst):
6263
print(errorMessageHeader + ' The file ' + dst + ' does not exist.')
64+
sys.exit(1)
6365
else:
6466
print('Compilation SUCCEEDED.')
6567
sys.stdout.flush()
@@ -84,6 +86,7 @@ def compileAmd():
8486
return_code = subprocess.call(cmd, shell=True)
8587
if return_code != 0:
8688
print(errorMessageHeader + ' executing command: ' + cmd)
89+
sys.exit(1)
8790

8891
result = subprocess.check_output(cmd, shell=True)
8992
hip_sdk_version = result.decode('utf-8')

scripts/bitcodes/precompile_bitcode.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ def compileScript(msg, cmd, dst):
6060
return_code = subprocess.call(cmd, shell=True)
6161
if return_code != 0:
6262
print(errorMessageHeader + ' executing command: ' + cmd)
63+
sys.exit(1)
6364
elif not os.path.exists(dst):
6465
print(errorMessageHeader + ' The file ' + dst + ' does not exist.')
66+
sys.exit(1)
6567
else:
6668
print('Compilation SUCCEEDED.')
6769
sys.stdout.flush()

0 commit comments

Comments
 (0)