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/private | |
| parent | 21ae0fa4451c40b14199fdb0df8cf61c51e26de9 (diff) | |
make autoconf tool to use is_cross to determine whether it is cross-compile.
Diffstat (limited to 'xmake/modules/private')
| -rw-r--r-- | xmake/modules/private/action/trybuild/autoconf.lua | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/xmake/modules/private/action/trybuild/autoconf.lua b/xmake/modules/private/action/trybuild/autoconf.lua index 9b5ac71f8..0eba27bf2 100644 --- a/xmake/modules/private/action/trybuild/autoconf.lua +++ b/xmake/modules/private/action/trybuild/autoconf.lua @@ -68,7 +68,7 @@ end function _get_buildenvs() local envs = {} local cross = false - if not _is_cross_compilation() then + if not is_cross() then local cflags = table.join(table.wrap(_get_buildenv("cxflags")), _get_buildenv("cflags")) local cxxflags = table.join(table.wrap(_get_buildenv("cxflags")), _get_buildenv("cxxflags")) local asflags = table.copy(table.wrap(_get_buildenv("asflags"))) @@ -174,17 +174,6 @@ function _get_buildenvs() return envs end --- is cross compilation? -function _is_cross_compilation() - if not is_plat(os.subhost()) then - return true - end - if is_plat("macosx") and not is_arch(os.subarch()) then - return true - end - return false -end - -- get configs function _get_configs(artifacts_dir) @@ -201,7 +190,7 @@ function _get_configs(artifacts_dir) end -- add host for cross-complation - if _is_cross_compilation() then + if is_cross() then if is_plat("iphoneos", "macosx") then local triples = { |
