File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -557,6 +557,25 @@ def initialize_options(self):
557557 def finalize_options (self ):
558558 v = beparent .finalize_options (self )
559559
560+ if os .environ .get ("CIBUILDWHEEL" ):
561+ # https://github.com/pypa/cibuildwheel/issues/331
562+ match sys .platform :
563+ case "linux" :
564+ for ext in self .extensions :
565+ ext .extra_compile_args = ["-g0" ]
566+ ext .extra_link_args = ["-Wl,--strip-debug" ]
567+ case "darwin" :
568+ for ext in self .extensions :
569+ ext .extra_compile_args = ["-g0" ]
570+ ext .extra_link_args = ["-S" ]
571+ case "win32" :
572+ for ext in self .extensions :
573+ ext .extra_link_args = ["/DEBUG:NONE" ]
574+ case _:
575+ # cibuildwheel doesn't support other platforms
576+ pass
577+
578+
560579 if self .enable_all_extensions :
561580 if self .use_system_sqlite_config :
562581 raise OptionError ("You can't enable both all extensions **and** using system SQLite config" )
You can’t perform that action at this time.
0 commit comments