gentoo/dev-libs/hiprt/files/hiprt-2.5-fail-on-errors.patch
Sv. Lockal d3e730b5c6
dev-libs/hiprt: new package, add 2.5.20250428
Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/42717
Signed-off-by: Sam James <sam@gentoo.org>
2025-10-29 04:38:17 +00:00

35 lines
1.3 KiB
Diff

--- a/scripts/bitcodes/compile.py
+++ b/scripts/bitcodes/compile.py
@@ -58,8 +58,10 @@ def compileScript(cmd, dst):
return_code = subprocess.call(cmd, shell=True)
if return_code != 0:
print(errorMessageHeader + ' executing command: ' + cmd)
+ sys.exit(1)
elif not os.path.exists(dst):
print(errorMessageHeader + ' The file ' + dst + ' does not exist.')
+ sys.exit(1)
else:
print('Compilation SUCCEEDED.')
sys.stdout.flush()
@@ -84,6 +86,7 @@ def compileAmd():
return_code = subprocess.call(cmd, shell=True)
if return_code != 0:
print(errorMessageHeader + ' executing command: ' + cmd)
+ sys.exit(1)
result = subprocess.check_output(cmd, shell=True)
hip_sdk_version = result.decode('utf-8')
--- a/scripts/bitcodes/precompile_bitcode.py
+++ b/scripts/bitcodes/precompile_bitcode.py
@@ -60,8 +60,10 @@ def compileScript(msg, cmd, dst):
return_code = subprocess.call(cmd, shell=True)
if return_code != 0:
print(errorMessageHeader + ' executing command: ' + cmd)
+ sys.exit(1)
elif not os.path.exists(dst):
print(errorMessageHeader + ' The file ' + dst + ' does not exist.')
+ sys.exit(1)
else:
print('Compilation SUCCEEDED.')
sys.stdout.flush()