remove debug symbols from wheel package
authorTaku Kudo <taku@google.com>
Wed, 8 Jun 2022 07:38:21 +0000 (16:38 +0900)
committerKentaro Hayashi <kenhys@xdump.org>
Mon, 21 Nov 2022 13:43:46 +0000 (13:43 +0000)
Signed-off-by: Kentaro Hayashi <kenhys@gmail.com>
Gbp-Pq: Name 0002-remove-debug-symbols-from-wheel-package.patch

python/setup.py

index cfbf0dbebae25f896213c4e8e35ca203b78c1754..198cba7d2808461ad11a97ef1a8ca55b0130013c 100755 (executable)
@@ -93,6 +93,9 @@ class build_ext(_build_ext):
     # See: https://github.com/neulab/xnmt/issues/199
     if sys.platform == 'darwin':
       cflags.append('-mmacosx-version-min=10.9')
+    else:
+      cflags.append('-Wl,-strip-all')
+      libs.append('-Wl,-strip-all')
     print('## cflags={}'.format(' '.join(cflags)))
     print('## libs={}'.format(' '.join(libs)))
     ext.extra_compile_args = cflags