Skip to content

Commit

Permalink
CR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrm committed Mar 22, 2023
1 parent 93fefd4 commit 590fbc6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Makefile.defs
Expand Up @@ -191,11 +191,11 @@ endif
ifneq (,$(filter $(UNAME), Darwin))
export DARWINHOST=1
ifneq (,$(filter $(UNAME_ARCH), arm64))
export DARWINM1HOST=1
export DARWIN_AARCH64_HOST=1
endif
ifdef EMULATE_READER
export DARWIN=1
ifdef DARWINM1HOST
ifdef DARWIN_AARCH64_HOST
export DARWIN_M1=1
endif
endif
Expand Down Expand Up @@ -507,7 +507,7 @@ ifdef MACOS
HOST_ARCH:=-mtune=generic
endif

ifdef DARWINM1HOST
ifdef DARWIN_AARCH64_HOST
HOST_ARCH:=-mcpu=apple-m1
endif

Expand Down
2 changes: 1 addition & 1 deletion Makefile.third
Expand Up @@ -610,7 +610,7 @@ $(OPENSSL_LIB) $(OPENSSL_DIR): $(THIRDPARTY_DIR)/openssl/*.*
-DRANLIB="$(RANLIB)" \
-DCHOST="$(CHOST)" \
$(if $(ANDROID),-DNDKABI=$(NDKABI),) \
-DCONFIG_SCRIPT="$(if $(EMULATE_READER),$(if $(DARWIN),Configure $(if $(DARWIN_M1),darwin64-arm64-cc,darwin64-x86_64-cc),config),Configure $(if $(WIN32),mingw,))" \
-DCONFIG_SCRIPT="$(if $(EMULATE_READER),$(if $(DARWIN),Configure $(if $(DARWIN_AARCH64),darwin64-arm64-cc,darwin64-x86_64-cc),config),Configure $(if $(WIN32),mingw,))" \
$(CURDIR)/$(THIRDPARTY_DIR)/openssl && \
$(CMAKE_MAKE_PROGRAM) $(CMAKE_MAKE_PROGRAM_FLAGS)

Expand Down
4 changes: 2 additions & 2 deletions ffi/util.lua
Expand Up @@ -63,7 +63,7 @@ int WideCharToMultiByte(
local getlibprefix = function()
-- Apple M1 homebrew installs libraries outside of default searchpaths,
-- and dyld environment variables are sip-protected on MacOS, cf. https://github.com/Homebrew/brew/issues/13481#issuecomment-1181592842
local libprefix = os.getenv("KO_DYLD_PREFIX");
local libprefix = os.getenv("KO_DYLD_PREFIX")

if not libprefix then
local std_out = io.popen("brew --prefix", "r")
Expand All @@ -73,7 +73,7 @@ local getlibprefix = function()
end
end

return libprefix or "";
return libprefix;
end

require("ffi/posix_h")
Expand Down

0 comments on commit 590fbc6

Please sign in to comment.