diff options
| author | ruki <[email protected]> | 2024-04-23 23:31:05 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-04-23 23:31:05 +0800 |
| commit | c628db675ad705e67eb17e91a2c4c0e4a3dbd57c (patch) | |
| tree | aece31809599c1f768f3dd4a6201c16134e60761 /xmake/modules/package/tools/autoconf.lua | |
| parent | 365354bdc353ae90dfe1e8918c67e0e6cfb3753d (diff) | |
Update autoconf.lua
Diffstat (limited to 'xmake/modules/package/tools/autoconf.lua')
| -rw-r--r-- | xmake/modules/package/tools/autoconf.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index c2b6c1a4d..02666beec 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -226,11 +226,13 @@ function buildenvs(package, opt) cxxflags = table.join(table.wrap(package:config("cxflags")), package:config("cxxflags")) asflags = table.copy(table.wrap(package:config("asflags"))) ldflags = table.copy(table.wrap(package:config("ldflags"))) + shflags = table.copy(table.wrap(package:config("shflags"))) if package:is_plat("linux") and package:is_arch("i386") then table.insert(cflags, "-m32") table.insert(cxxflags, "-m32") table.insert(asflags, "-m32") table.insert(ldflags, "-m32") + table.insert(shflags, "-m32") end table.join2(cflags, opt.cflags) table.join2(cflags, opt.cxflags) @@ -239,10 +241,12 @@ function buildenvs(package, opt) table.join2(cppflags, opt.cppflags) -- @see https://github.com/xmake-io/xmake/issues/1688 table.join2(asflags, opt.asflags) table.join2(ldflags, opt.ldflags) + table.join2(shflags, opt.shflags) table.join2(cflags, _get_cflags_from_packagedeps(package, opt)) table.join2(cxxflags, _get_cflags_from_packagedeps(package, opt)) table.join2(cppflags, _get_cflags_from_packagedeps(package, opt)) table.join2(ldflags, _get_ldflags_from_packagedeps(package, opt)) + table.join2(shflags, _get_ldflags_from_packagedeps(package, opt)) else cross = true cppflags = {} @@ -312,12 +316,13 @@ function buildenvs(package, opt) table.join2(ldflags, _map_linkflags(fake_target, "binary", {"cxx"}, "runtime", runtimes)) fake_target = {is_shared = function(_) return true end, sourcekinds = function(_) return "cxx" end} - shflags = table.join2(shflags or {}, _map_linkflags(fake_target, "shared", {"cxx"}, "runtime", runtimes)) + table.join2(shflags, _map_linkflags(fake_target, "shared", {"cxx"}, "runtime", runtimes)) end if package:config("asan") then table.join2(cflags, package:_generate_sanitizer_configs("address", "cc").cflags) table.join2(cxxflags, package:_generate_sanitizer_configs("address", "cxx").cxxflags) table.join2(ldflags, package:_generate_sanitizer_configs("address").ldflags) + table.join2(shflags, package:_generate_sanitizer_configs("address").shflags) end if cflags then envs.CFLAGS = table.concat(_translate_paths(cflags), ' ') |
