summaryrefslogtreecommitdiff
path: root/platform/x11/platform_x11_builders.py
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11/platform_x11_builders.py')
-rw-r--r--platform/x11/platform_x11_builders.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/platform/x11/platform_x11_builders.py b/platform/x11/platform_x11_builders.py
new file mode 100644
index 0000000000..5ff0c6fb14
--- /dev/null
+++ b/platform/x11/platform_x11_builders.py
@@ -0,0 +1,17 @@
+"""Functions used to generate source files during build time
+
+All such functions are invoked in a subprocess on Windows to prevent build flakiness.
+
+"""
+import os
+from platform_methods import subprocess_main
+
+
+def make_debug_x11(target, source, env):
+ os.system('objcopy --only-keep-debug {0} {0}.debugsymbols'.format(target[0]))
+ os.system('strip --strip-debug --strip-unneeded {0}'.format(target[0]))
+ os.system('objcopy --add-gnu-debuglink={0}.debugsymbols {0}'.format(target[0]))
+
+
+if __name__ == '__main__':
+ subprocess_main(globals())