Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Darwin build improvements #406

Merged
merged 4 commits into from
Sep 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,22 @@
"configurations": {
"Release": {
"target_conditions": [
["OS != 'win'", {
['OS not in "ios mac win"', {
Torrekie marked this conversation as resolved.
Show resolved Hide resolved
"cflags+": ["-fdata-sections", "-ffunction-sections", "-flto", "-fvisibility=hidden"],
"ldflags+": ["-Wl,--gc-sections"]
"ldflags+": ["-Wl,--gc-sections"],
"defines+": ["_FORTIFY_SOURCE=2", "NDEBUG"],
}],
# Avoid defining _FORTIFY_SOURCE on Darwin
Torrekie marked this conversation as resolved.
Show resolved Hide resolved
['OS not in "ios mac"', {
"defines+": ["_FORTIFY_SOURCE=2"],
}],
['OS in "ios mac"', {
# On Darwin with Xcode CLT/LLVM, "-fvisibility=hidden" hide all symbols that
# not explicitly marked with __attribute__((visibility("default")))
"cflags+": ["-fexceptions", "-flto"]
}]
],
"defines+": ["_FORTIFY_SOURCE=2", "NDEBUG"]
"defines+": ["NDEBUG"]
}
}
},
Expand Down