aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuau <luau.project@gmail.com>2025-02-24 16:57:28 -0300
committerGitHub <noreply@github.com>2025-02-24 16:57:28 -0300
commit41a14ed522d6904ad6bc14dd737a4cdc6142ca82 (patch)
treef56eaec1ab4791375a48db3deed1c7c1fa94fdb5 /src
parentc8653e5c712a3f3c4c4b3724ceda3caaf2d34851 (diff)
downloadluarocks-41a14ed522d6904ad6bc14dd737a4cdc6142ca82.tar.gz
luarocks-41a14ed522d6904ad6bc14dd737a4cdc6142ca82.tar.bz2
luarocks-41a14ed522d6904ad6bc14dd737a4cdc6142ca82.zip
fix: override default C compiler to cc.exe on MSYS2 (#1754)
## Description Fixes #1753. Changes: 1. on each MSYS2 MinGW-w64 environment, there is a `cc.exe` that points to the default C compiler for the environment. 2. the line ```lua defaults.variables.PWD = "cd" ``` is meant to follow a MSYS2 patch ( https://github.com/msys2/MINGW-packages/blob/5fd4997c2508f0949366513f0a2dd4347f9c4e77/mingw-w64-lua-luarocks/0001-luarocks_msys2_mingw_w64.patch#L48 ) that fixes previous issues for them.
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/core/cfg.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua
index 6d8fe55b..e9139a4e 100644
--- a/src/luarocks/core/cfg.lua
+++ b/src/luarocks/core/cfg.lua
@@ -468,6 +468,12 @@ local function make_defaults(lua_version, target_cpu, platforms, home)
468 end 468 end
469 end 469 end
470 470
471 if platforms.msys2_mingw_w64 then
472 defaults.variables.PWD = "cd"
473 defaults.variables.CC = os.getenv("CC") or "cc"
474 defaults.variables.LD = os.getenv("CC") or "cc"
475 end
476
471 if platforms.bsd then 477 if platforms.bsd then
472 defaults.variables.MAKE = "gmake" 478 defaults.variables.MAKE = "gmake"
473 defaults.gcc_rpath = false 479 defaults.gcc_rpath = false