Skip to content

Commit

Permalink
fix: fall back to CC and CFLAGS if CXX(FLAGS) are not set
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb authored Aug 22, 2024
1 parent 8fc0cf0 commit 3f29c60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/luarocks/build/treesitter-parser-cpp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ local function run(rockspec, no_install)
---@return string[] flags flags
local function get_cc(source)
if source:match("%.cc$") ~= nil or source:match("%.cpp$") ~= nil or source:match("%.cxx$") ~= nil then
return variables.CXX, variables.CXXFLAGS
return variables.CXX or variables.CC, variables.CXXFLAGS or variables.CFLAGS
else
return variables.CC, variables.CFLAGS
end
Expand Down

0 comments on commit 3f29c60

Please sign in to comment.