diff options
| author | ruki <[email protected]> | 2025-11-24 23:02:52 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-11-24 23:02:52 +0800 |
| commit | 49a1737db8d36a9715f71d9cb1acbffe8e7e7faf (patch) | |
| tree | 1e85ceafac32edb1513a58ab4ef7d5b22e932fcb | |
| parent | c2bbd0dd3b705de1906ba313e82a4ebf02242015 (diff) | |
disable version script on solaris
| -rw-r--r-- | xmake/rules/linker/version_scripts/xmake.lua | 4 | ||||
| -rw-r--r-- | xmake/rules/utils/symbols/export_list/xmake.lua | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/xmake/rules/linker/version_scripts/xmake.lua b/xmake/rules/linker/version_scripts/xmake.lua index 3845274de..b163eaa04 100644 --- a/xmake/rules/linker/version_scripts/xmake.lua +++ b/xmake/rules/linker/version_scripts/xmake.lua @@ -39,6 +39,10 @@ rule("linker.version_scripts") if target:is_plat("macosx", "iphoneos", "watchos", "appletvos") then return end + -- @note Solaris linker does not support --version-script + if target:is_plat("solaris") then + return + end if target:has_tool("ld", "gcc", "gxx", "clang", "clangxx") or target:has_tool("sh", "gcc", "gxx", "clang", "clangxx") then target:add(target:is_shared() and "shflags" or "ldflags", "-Wl,--version-script=" .. scriptfile, {force = true}) diff --git a/xmake/rules/utils/symbols/export_list/xmake.lua b/xmake/rules/utils/symbols/export_list/xmake.lua index f156e22af..84878fe7b 100644 --- a/xmake/rules/utils/symbols/export_list/xmake.lua +++ b/xmake/rules/utils/symbols/export_list/xmake.lua @@ -66,6 +66,9 @@ rule("utils.symbols.export_list") exportkind = "apple" exportfile = path.join(target:autogendir(), "rules", "symbols", "export_list.exp") target:add("shflags", {"-L-exported_symbols_list", "-L" .. exportfile}, {force = true, expand = false}) + elseif target:is_plat("solaris") then + -- Solaris linker does not support --version-script + return else exportkind = "ver" exportfile = path.join(target:autogendir(), "rules", "symbols", "export_list.map") @@ -85,6 +88,9 @@ rule("utils.symbols.export_list") exportkind = "apple" exportfile = path.join(target:autogendir(), "rules", "symbols", "export_list.exp") target:add("shflags", {"-Wl,-exported_symbols_list", exportfile}, {force = true, expand = false}) + elseif target:is_plat("solaris") then + -- Solaris linker does not support --version-script + return elseif target:has_tool("ld", "gcc", "gxx", "clang", "clangxx") or target:has_tool("sh", "gcc", "gxx", "clang", "clangxx") then exportkind = "ver" |
