chore: remove install_name_tool and add m1 support

This commit is contained in:
Richard Ramos 2021-09-29 20:11:42 -04:00
parent e29ba9c9fa
commit 33bef9b2f8
3 changed files with 8 additions and 4 deletions

7
config.nims Normal file
View File

@ -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")

View File

@ -43,9 +43,6 @@ proc buildAndRun(name: string,
" --out:" & outDir & name & " --out:" & outDir & name &
" " & " " &
srcDir & name & ".nim" 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": if getEnv("RUN_AFTER_BUILD").strip != "false":
exec outDir & name exec outDir & name

2
vendor/status-go vendored

@ -1 +1 @@
Subproject commit cee18efd710756c662c19ea9b167a47112847388 Subproject commit 607507d20ae9e76e05bae7ec176dd41aca86e732