From 234e06bcc85a2c2cad17643a92dd0fbada09f439 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Wed, 13 Dec 2023 15:12:56 +0100 Subject: [PATCH 1/7] Try working around `clang-16` linking issue --- Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 72468ab..8664d2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,3 +42,7 @@ assert_cmd = "2" [package.metadata.binstall] pkg-url = "{ repo }/releases/download/{ version }/{ name }-{ target }{ archive-suffix }" pkg-fmt = "tgz" # archive-suffix = .tar.gz + +[target.aarch64-apple-darwin] +rustc-link-lib = ["libc++abi.dylib"] + From eecca9d51707bcd28fb22ffdd1e9ffd539e1fcce Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Wed, 13 Dec 2023 15:35:23 +0100 Subject: [PATCH 2/7] place in config --- .cargo/config.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..6ca55bc --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,3 @@ +[target.aarch64-apple-darwin] +rustc-link-lib = ["libc++abi.dylib"] + From 90783fbe711a08087f9c98aa1e61d39ee2c29ba7 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Wed, 13 Dec 2023 15:57:39 +0100 Subject: [PATCH 3/7] use `c++` to link --- .cargo/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 6ca55bc..8ab67fb 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,3 +1,3 @@ [target.aarch64-apple-darwin] -rustc-link-lib = ["libc++abi.dylib"] +linker = "/nix/store/zh206nri10wwp68g7qf9ccya1irynx5g-clang-wrapper-16.0.6/bin/c++" From 6afd85ebefdb01759e93a41897a9e334d16e88f2 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Wed, 13 Dec 2023 16:47:50 +0100 Subject: [PATCH 4/7] try `rustflags` --- .cargo/config.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index 8ab67fb..af92bd5 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,3 +1,6 @@ [target.aarch64-apple-darwin] +rustflags = [ + "-C", "linker=c++" +] linker = "/nix/store/zh206nri10wwp68g7qf9ccya1irynx5g-clang-wrapper-16.0.6/bin/c++" From ffeef6c0477e1e068f68e5cbbe84aceb7d59be2a Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Wed, 13 Dec 2023 17:13:16 +0100 Subject: [PATCH 5/7] Revert "Try working around `clang-16` linking issue" This reverts commit 234e06bcc85a2c2cad17643a92dd0fbada09f439. --- Cargo.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8664d2d..72468ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,3 @@ assert_cmd = "2" [package.metadata.binstall] pkg-url = "{ repo }/releases/download/{ version }/{ name }-{ target }{ archive-suffix }" pkg-fmt = "tgz" # archive-suffix = .tar.gz - -[target.aarch64-apple-darwin] -rustc-link-lib = ["libc++abi.dylib"] - From 2752797470c9213e830320d7accf6742299756b6 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Wed, 13 Dec 2023 17:14:07 +0100 Subject: [PATCH 6/7] remove useless --- .cargo/config.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index af92bd5..a4b2c5b 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -2,5 +2,4 @@ rustflags = [ "-C", "linker=c++" ] -linker = "/nix/store/zh206nri10wwp68g7qf9ccya1irynx5g-clang-wrapper-16.0.6/bin/c++" From 23f40749e429855b5a684121731b2a38e56f62f5 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Wed, 13 Dec 2023 17:21:05 +0100 Subject: [PATCH 7/7] `x86_64-apple-darwin` too --- .cargo/config.toml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index a4b2c5b..d35821d 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,6 @@ +[target.x86_64-apple-darwin] +rustflags = [ "-C", "linker=c++" ] + [target.aarch64-apple-darwin] -rustflags = [ - "-C", "linker=c++" -] +rustflags = [ "-C", "linker=c++" ]