summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/autoconf.lua
diff options
context:
space:
mode:
authorJérôme Leclercq <[email protected]>2024-03-31 00:18:06 +0100
committerGitHub <[email protected]>2024-03-31 00:18:06 +0100
commit62fbe909667a1849bd55321ac37d0f294d9eb797 (patch)
tree2b3be4d9609af178c2a3163922580ccb3d2f2eeb /xmake/modules/package/tools/autoconf.lua
parent2680790af47db186d442bdb1a83fc97383e91e4e (diff)
Update autoconf.lua
Diffstat (limited to 'xmake/modules/package/tools/autoconf.lua')
-rw-r--r--xmake/modules/package/tools/autoconf.lua16
1 files changed, 12 insertions, 4 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua
index 9e36ff8f4..473024a95 100644
--- a/xmake/modules/package/tools/autoconf.lua
+++ b/xmake/modules/package/tools/autoconf.lua
@@ -309,10 +309,18 @@ function buildenvs(package, opt)
table.join2(cxxflags, package:_generate_sanitizer_configs("address", "cxx").cxxflags)
table.join2(ldflags, package:_generate_sanitizer_configs("address").ldflags)
end
- envs.CFLAGS = table.concat(_translate_paths(cflags), ' ')
- envs.CXXFLAGS = table.concat(_translate_paths(cxxflags), ' ')
- envs.CPPFLAGS = table.concat(_translate_paths(cppflags), ' ')
- envs.ASFLAGS = table.concat(_translate_paths(asflags), ' ')
+ if cflags then
+ envs.CFLAGS = table.concat(_translate_paths(cflags), ' ')
+ end
+ if cxxflags then
+ envs.CXXFLAGS = table.concat(_translate_paths(cxxflags), ' ')
+ end
+ if cppflags then
+ envs.CPPFLAGS = table.concat(_translate_paths(cppflags), ' ')
+ end
+ if asflags then
+ envs.ASFLAGS = table.concat(_translate_paths(asflags), ' ')
+ end
if arflags then
envs.ARFLAGS = table.concat(_translate_paths(arflags), ' ')
end