[gimp/wip/Jehan/test-msys2-aalib: 1/2] build: add ability to run dll_link with debug.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/wip/Jehan/test-msys2-aalib: 1/2] build: add ability to run dll_link with debug.
- Date: Tue, 29 Mar 2022 15:46:42 +0000 (UTC)
commit 2728de3e5b20e249911140c0036d41b3b3d0f109
Author: Jehan <jehan girinstud io>
Date: Tue Mar 29 16:25:17 2022 +0200
build: add ability to run dll_link with debug.
The --debug option so far would only output debug info. I want both the
run to actually occur and the debug to be printed, at least in some
cases. So I make this a choice option with 3 variants (no debug, debug
only and run + debug).
build/windows/gitlab-ci/dll_link.py | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/build/windows/gitlab-ci/dll_link.py b/build/windows/gitlab-ci/dll_link.py
index 3b5b4975ae..2cfacc9bf5 100755
--- a/build/windows/gitlab-ci/dll_link.py
+++ b/build/windows/gitlab-ci/dll_link.py
@@ -49,8 +49,12 @@ def main(binary, srcdirs, destdir, debug, dll_file):
sys.stdout.write("{} (INFO): searching for dependencies of {} in {}.\n".format(os.path.basename(__file__),
binary, ', '.join(srcdirs)))
find_dependencies(os.path.abspath(binary), srcdirs)
- if args.debug:
- print("Running in debug mode (no DLL moved)")
+ if debug in ['debug-only', 'debug-run']:
+ if debug == 'debug-only':
+ print("Running in debug-only mode (no DLL moved) for '{}'".format(dll_file))
+ else
+ print("Running with debug output for '{}'".format(dll_file))
+
if len(dlls) > 0:
sys.stdout.write("Needed DLLs:\n\t- ")
sys.stdout.write("\n\t- ".join(list(dlls)))
@@ -69,6 +73,9 @@ def main(binary, srcdirs, destdir, debug, dll_file):
sys.stdout.write('Installed DLLs:\n\t- ')
sys.stdout.write("\n\t- ".join(installed_dlls))
print()
+
+ if debug == 'debug-run':
+ copy_dlls(dlls - sys_dlls, srcdirs, destdir)
else:
copy_dlls(dlls - sys_dlls, srcdirs, destdir)
@@ -151,7 +158,7 @@ def copy_dlls(dll_list, srcdirs, destdir):
if __name__ == "__main__":
parser = argparse.ArgumentParser()
- parser.add_argument('--debug', dest='debug', action = 'store_true', default = False)
+ parser.add_argument('--debug', dest='debug', choices=['debug-only', 'debug-run', 'run-only'] default =
'run-only')
parser.add_argument('--output-dll-list', dest='dll_file', action = 'store', default = None)
parser.add_argument('bin')
parser.add_argument('src', nargs='+')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]