diff options
| author | ruki <[email protected]> | 2022-09-22 23:16:24 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-09-22 23:16:24 +0800 |
| commit | 583ec4db7a4e98773ec5d865090abb60de3066e0 (patch) | |
| tree | 448bab9c919d3f9005c693bb9e115c2d0404d811 /xmake/modules/private | |
| parent | 9473e491160500cda2670e5140cfd2bfe2c1adbb (diff) | |
add sourcedir for debugging
Diffstat (limited to 'xmake/modules/private')
| -rw-r--r-- | xmake/modules/private/xrepo/action/install.lua | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/xmake/modules/private/xrepo/action/install.lua b/xmake/modules/private/xrepo/action/install.lua index bd77e7b00..3bea3cd60 100644 --- a/xmake/modules/private/xrepo/action/install.lua +++ b/xmake/modules/private/xrepo/action/install.lua @@ -65,6 +65,8 @@ function menu_options() {nil, "xcode_sdkver", "kv", nil, "The SDK Version for Xcode" }, {nil, "target_minver", "kv", nil, "The Target Minimal Version" }, {nil, "appledev", "kv", nil, "The Apple Device Type" }, + {category = "Debug Configuration" }, + {'s', "sourcedir", "kv", nil, "The source directory of the current package for debugging. It will enable --force/--shallow by default."}, {category = "Other Configuration" }, {nil, "force", "k", nil, "Force to reinstall all package dependencies."}, {nil, "shallow", "k", nil, "Does not install dependent packages."}, @@ -228,13 +230,20 @@ function _install_packages(packages) if option.get("linkjobs") then table.insert(require_argv, "--linkjobs=" .. option.get("linkjobs")) end - if option.get("force") then + local is_debug = false + local sourcedir = option.get("sourcedir") + if sourcedir then + is_debug = true + table.insert(require_argv, "-s") + table.insert(require_argv, path.absolute(sourcedir)) + end + if option.get("force") or is_debug then table.insert(require_argv, "--force") end - if option.get("shallow") then + if option.get("shallow") or is_debug then table.insert(require_argv, "--shallow") end - if option.get("build") then + if option.get("build") or is_debug then table.insert(require_argv, "--build") end local extra = {system = false} |
