Skip to content

Commit

Permalink
Merge pull request #99 from micro-manager/compiler-flags
Browse files Browse the repository at this point in the history
Re-add compiler and linker flags
  • Loading branch information
marktsuchida authored Nov 3, 2023
2 parents d78611f + 5655360 commit 3527d0f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ jobs:
uses: pypa/[email protected]
env:
CIBW_ARCHS_MACOS: "${{ matrix.macos_arch }}"
# Python on Linux is usually configured to add debug information,
# which increases binary size by ~11-fold. Remove for the builds we
# distribute.
CIBW_ENVIRONMENT_LINUX: "LDFLAGS=-Wl,--strip-debug"

- uses: actions/upload-artifact@v3
with:
Expand Down
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,14 @@ def run(self):
mmcore_libraries.extend(["dl"])

if not IS_WINDOWS:
cflags = ["-std=c++14"]
cflags = [
"-std=c++14",
"-fvisibility=hidden",
"-Wno-deprecated", # Hide warnings for throw() specififiers
"-Wno-unused-variable", # Hide warnings for SWIG-generated code
]
if "CFLAGS" in os.environ:
cflags.insert(0, os.environ["CFLAGS"])
cflags.append(os.environ["CFLAGS"])
os.environ["CFLAGS"] = " ".join(cflags)


Expand Down

0 comments on commit 3527d0f

Please sign in to comment.