diff options
| author | ruki <[email protected]> | 2024-03-30 23:43:25 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-03-30 23:43:25 +0800 |
| commit | 2b1491a54695612af04e79b24b38c2da2f794e16 (patch) | |
| tree | 38ecec3fc91ce6e51d464df41469d8e13919c40f | |
| parent | 05a9e1729b264a0b3cfed8a6df1c13e170d9e420 (diff) | |
add more rules
| -rw-r--r-- | xmake/rules/linker/link_scripts/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/platform/windows/def/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/platform/windows/manifest/xmake.lua | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/xmake/rules/linker/link_scripts/xmake.lua b/xmake/rules/linker/link_scripts/xmake.lua index fdd714988..34bbc3f4f 100644 --- a/xmake/rules/linker/link_scripts/xmake.lua +++ b/xmake/rules/linker/link_scripts/xmake.lua @@ -42,8 +42,10 @@ rule("linker.link_scripts") 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", "-T " .. scriptfile, {force = true}) + target:data_add("linkdepfiles", scriptfile) elseif target:has_tool("ld", "ld") or target:has_tool("sh", "ld") then target:add(target:is_shared() and "shflags" or "ldflags", "-T " .. scriptfile, {force = true}) + target:data_add("linkdepfiles", scriptfile) end end) diff --git a/xmake/rules/platform/windows/def/xmake.lua b/xmake/rules/platform/windows/def/xmake.lua index 5d1957b0b..9bdcdc874 100644 --- a/xmake/rules/platform/windows/def/xmake.lua +++ b/xmake/rules/platform/windows/def/xmake.lua @@ -38,8 +38,8 @@ rule("platform.windows.def") flag = "/def:" .. flag end -- https://github.com/xmake-io/xmake/pull/4901 - target:data_add("linkdepfiles", sourcefile) target:add("shflags", flag, {force = true}) + target:data_add("linkdepfiles", sourcefile) break; end end diff --git a/xmake/rules/platform/windows/manifest/xmake.lua b/xmake/rules/platform/windows/manifest/xmake.lua index 8d24ced97..6bde53a3d 100644 --- a/xmake/rules/platform/windows/manifest/xmake.lua +++ b/xmake/rules/platform/windows/manifest/xmake.lua @@ -34,6 +34,7 @@ rule("platform.windows.manifest") for _, sourcefile in ipairs(sourcebatch.sourcefiles) do target:add("ldflags", "/manifestinput:" .. path.translate(sourcefile), {force = true}) target:add("shflags", "/manifestinput:" .. path.translate(sourcefile), {force = true}) + target:data_add("linkdepfiles", sourcefile) manifest = true local content = io.readfile(sourcefile) if content then |
