From 33bef9b2f83e50f3606dbc063694eeb93a354770 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Wed, 29 Sep 2021 20:11:42 -0400 Subject: [PATCH] chore: remove install_name_tool and add m1 support --- config.nims | 7 +++++++ nim_status_lib.nimble | 3 --- vendor/status-go | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 config.nims diff --git a/config.nims b/config.nims new file mode 100644 index 0000000..8d021a4 --- /dev/null +++ b/config.nims @@ -0,0 +1,7 @@ +if defined(macosx): + switch("passL", "-rpath " & getEnv("STATUSGO_LIBDIR")) + if hostCPU == "arm64": # Crosscompiling to amd64 since arm64 is not supported + switch("cpu", "amd64") + switch("os", "MacOSX") + switch("passL", "-arch x86_64") + switch("passC", "-arch x86_64") diff --git a/nim_status_lib.nimble b/nim_status_lib.nimble index 69a705b..453c748 100644 --- a/nim_status_lib.nimble +++ b/nim_status_lib.nimble @@ -43,9 +43,6 @@ proc buildAndRun(name: string, " --out:" & outDir & name & " " & srcDir & name & ".nim" - if defined(macosx): - exec "install_name_tool -add_rpath " & getEnv("STATUSGO_LIBDIR") & " " & outDir & name - exec "install_name_tool -change " & "libstatus." & getEnv("LIBSTATUS_EXT") & " @rpath/libstatus." & getEnv("LIBSTATUS_EXT") & " " & outDir & name if getEnv("RUN_AFTER_BUILD").strip != "false": exec outDir & name diff --git a/vendor/status-go b/vendor/status-go index cee18ef..607507d 160000 --- a/vendor/status-go +++ b/vendor/status-go @@ -1 +1 @@ -Subproject commit cee18efd710756c662c19ea9b167a47112847388 +Subproject commit 607507d20ae9e76e05bae7ec176dd41aca86e732