Skip to content

Commit 026539c

Browse files
committed
Make macOS use dynamic lookup for its linking
1 parent ababe10 commit 026539c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.cargo/cargo.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,20 @@ rustflags = ["-C", "link-args=-Wl,-export-dynamic"]
33

44
[target.aarch64-unknown-linux-gnu]
55
rustflags = ["-C", "link-args=-Wl,-export-dynamic"]
6+
7+
[target.x86_64-apple-darwin]
8+
rustflags = [
9+
"-C", "link-arg=-undefined",
10+
"-C", "link-arg=dynamic_lookup",
11+
]
12+
13+
[target.aarch64-apple-darwin]
14+
rustflags = [
15+
"-C", "link-arg=-undefined",
16+
"-C", "link-arg=dynamic_lookup",
17+
]
18+
19+
[build]
20+
rustflags = [
21+
"-C", "link-args=-Wl,-rpath,/Library/Developer/CommandLineTools/Library/Frameworks",
22+
]

0 commit comments

Comments
 (0)