diff options
| author | ruki <[email protected]> | 2023-08-09 23:48:46 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-08-09 23:48:46 +0800 |
| commit | 3660a7f4d4ef298fd4dff2092f19fa981fcd354d (patch) | |
| tree | 2c405a8a05583871b1238bbfbe0ef0ed53399bc2 /xmake/modules/package/tools/xmake.lua | |
| parent | 682560e43ac5ac6610d16cbf4aacfcb505c3e8f8 (diff) | |
improve to pass flags to packages #4046
Diffstat (limited to 'xmake/modules/package/tools/xmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/xmake.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/xmake.lua b/xmake/modules/package/tools/xmake.lua index 477dd35c8..0594d0f6b 100644 --- a/xmake/modules/package/tools/xmake.lua +++ b/xmake/modules/package/tools/xmake.lua @@ -198,6 +198,7 @@ function _get_configs(package, configs, opt) local cxxflags = table.join(table.wrap(package:config("cxxflags")), get_config("cxxflags")) local asflags = table.join(table.wrap(package:config("asflags")), get_config("asflags")) local ldflags = table.join(table.wrap(package:config("ldflags")), get_config("ldflags")) + local shflags = table.join(table.wrap(package:config("shflags")), get_config("shflags")) table.insert(configs, "--plat=" .. package:plat()) table.insert(configs, "--arch=" .. package:arch()) if configs.mode == nil then @@ -266,6 +267,9 @@ function _get_configs(package, configs, opt) if ldflags and #ldflags > 0 then table.insert(configs, "--ldflags=" .. table.concat(ldflags, ' ')) end + if shflags and #shflags > 0 then + table.insert(configs, "--shflags=" .. table.concat(shflags, ' ')) + end local buildir = opt.buildir or package:buildir() if buildir then table.insert(configs, "--buildir=" .. buildir) |
