diff options
| author | Redbeanw44602 <[email protected]> | 2024-08-31 00:11:08 +0800 |
|---|---|---|
| committer | Redbeanw44602 <[email protected]> | 2024-08-31 00:11:08 +0800 |
| commit | e12ef8929c33284a20db64fd4f2b6569ae01cea4 (patch) | |
| tree | 04a88cb5ff147f13893bebbb3ad418dd7c00fbb8 /xmake/modules/package/tools/autoconf.lua | |
| parent | 21ae0fa4451c40b14199fdb0df8cf61c51e26de9 (diff) | |
make autoconf tool to use is_cross to determine whether it is cross-compile.
Diffstat (limited to 'xmake/modules/package/tools/autoconf.lua')
| -rw-r--r-- | xmake/modules/package/tools/autoconf.lua | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index b84ac87e4..5cfb1d28d 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -77,17 +77,6 @@ function _get_msvc_runenvs(package) return os.joinenvs(_get_msvc(package):runenvs()) end --- is cross compilation? -function _is_cross_compilation(package) - if not package:is_plat(os.subhost()) then - return true - end - if package:is_plat("macosx") and not package:is_arch(os.subarch()) then - return true - end - return false -end - -- get memcache function _memcache() return memcache.cache("package.tools.autoconf") @@ -115,7 +104,7 @@ function _get_configs(package, configs) table.insert(configs, "--prefix=" .. _translate_paths(package:installdir())) -- add host for cross-complation - if not configs.host and _is_cross_compilation(package) then + if not configs.host and package:is_cross() then if package:is_plat("iphoneos", "macosx") then local triples = { @@ -240,7 +229,7 @@ function buildenvs(package, opt) local envs = {} local cross = false local cflags, cxxflags, cppflags, asflags, ldflags, shflags, arflags - if not _is_cross_compilation(package) and not package:config("toolchains") then + if not package:is_cross() and not package:config("toolchains") then cppflags = {} cflags = table.join(table.wrap(package:config("cxflags")), package:config("cflags")) cxxflags = table.join(table.wrap(package:config("cxflags")), package:config("cxxflags")) |
