2019-03-07 07:58:06 +00:00
|
|
|
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua
|
2019-06-13 11:52:34 +01:00
|
|
|
index c5af5a2..1949fdc 100644
|
2019-03-07 07:58:06 +00:00
|
|
|
--- a/src/luarocks/core/cfg.lua
|
|
|
|
+++ b/src/luarocks/core/cfg.lua
|
2019-06-13 11:52:34 +01:00
|
|
|
@@ -425,7 +425,7 @@ local function make_defaults(lua_version, target_cpu, platforms, home)
|
2019-03-07 07:58:06 +00:00
|
|
|
defaults.external_lib_extension = "dylib"
|
|
|
|
defaults.arch = "macosx-"..target_cpu
|
|
|
|
defaults.variables.LIBFLAG = "-bundle -undefined dynamic_lookup -all_load"
|
|
|
|
- local version = util.popen_read("sw_vers -productVersion")
|
2019-08-15 00:16:31 +01:00
|
|
|
+ local version = os.getenv("MACOSX_DEPLOYMENT_TARGET") or "10.12"
|
2019-03-07 07:58:06 +00:00
|
|
|
version = tonumber(version and version:match("^[^.]+%.([^.]+)")) or 3
|
|
|
|
if version >= 10 then
|
|
|
|
version = 8
|
2019-06-13 11:52:34 +01:00
|
|
|
@@ -434,8 +434,8 @@ local function make_defaults(lua_version, target_cpu, platforms, home)
|
2019-03-07 07:58:06 +00:00
|
|
|
else
|
|
|
|
defaults.gcc_rpath = false
|
|
|
|
end
|
|
|
|
- defaults.variables.CC = "env MACOSX_DEPLOYMENT_TARGET=10."..version.." gcc"
|
|
|
|
- defaults.variables.LD = "env MACOSX_DEPLOYMENT_TARGET=10."..version.." gcc"
|
|
|
|
+ defaults.variables.CC = "env MACOSX_DEPLOYMENT_TARGET=10."..version.." clang"
|
|
|
|
+ defaults.variables.LD = "env MACOSX_DEPLOYMENT_TARGET=10."..version.." clang"
|
|
|
|
defaults.web_browser = "open"
|
2019-02-11 20:10:30 +00:00
|
|
|
end
|
|
|
|
|