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

Explicitly define used NIF symbols #792

Merged
merged 1 commit into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions .changesets/fix-extension-link-new-xcode-tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
bump: "patch"
type: "fix"
---

Fix compile-time error that broke linking on macOS 12.6, more specifically the latest Xcode at this time (version 14.0 14A309).
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,23 @@ ifneq ($(OS),Windows_NT)
endif

ifeq ($(shell uname),Darwin)
LDFLAGS += -dynamiclib -undefined dynamic_lookup
# Specify symbols used in the appsignal_extension.c file.
# The symbols are looked up at runtime, when the Elixir Nif library is loaded.
LDFLAGS += -dynamiclib -Wl,-fatal_warnings, \
-U,_enif_alloc_resource, \
-U,_enif_get_double, \
-U,_enif_get_int, \
-U,_enif_get_long, \
-U,_enif_get_resource, \
-U,_enif_inspect_iolist_as_binary, \
-U,_enif_make_atom, \
-U,_enif_make_badarg, \
-U,_enif_make_resource, \
-U,_enif_make_string, \
-U,_enif_make_string_len, \
-U,_enif_make_tuple, \
-U,_enif_open_resource_type, \
-U,_enif_release_resource
endif

all:
Expand Down