diff options
| author | ruki <[email protected]> | 2021-03-04 22:42:13 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-03-04 22:42:13 +0800 |
| commit | 15ef8e4972375818dd4bcb0693c3ac7b2450e91c (patch) | |
| tree | e273c7d50e248701064a88403a12adeb02123987 | |
| parent | 45facfc23f69c05883e7cbfc7835375ce2b36cbb (diff) | |
revert def/manifest rules
| -rw-r--r-- | xmake/rules/platform/windows/def/xmake.lua | 7 | ||||
| -rw-r--r-- | xmake/rules/platform/windows/manifest/xmake.lua | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/xmake/rules/platform/windows/def/xmake.lua b/xmake/rules/platform/windows/def/xmake.lua index b649377a5..97c356c28 100644 --- a/xmake/rules/platform/windows/def/xmake.lua +++ b/xmake/rules/platform/windows/def/xmake.lua @@ -21,6 +21,7 @@ -- add *.def for windows/dll rule("platform.windows.def") set_extensions(".def") + --[[FIXME after_load("windows", function (target) local _, toolname = target:tool("ld") if toolname == "link" then @@ -32,5 +33,11 @@ rule("platform.windows.def") end end end + end)]] + before_build_file("windows", function (target, sourcefile) + local _, toolname = target:tool("ld") + if toolname == "link" then + target:add("shflags", "/def:" .. path.translate(sourcefile), {force = true}) + end end) diff --git a/xmake/rules/platform/windows/manifest/xmake.lua b/xmake/rules/platform/windows/manifest/xmake.lua index 6d3e4c0d6..77546e25e 100644 --- a/xmake/rules/platform/windows/manifest/xmake.lua +++ b/xmake/rules/platform/windows/manifest/xmake.lua @@ -22,6 +22,7 @@ -- https://github.com/xmake-io/xmake/issues/1241 rule("platform.windows.manifest") set_extensions(".manifest") + --[[FIXME after_load("windows", function (target) local _, toolname = target:tool("ld") if toolname == "link" then @@ -38,4 +39,10 @@ rule("platform.windows.manifest") target:add("ldflags", "/manifest", {force = true}) end end + end)]] + before_build_file("windows", function (target, sourcefile) + local _, toolname = target:tool("ld") + if toolname == "link" then + target:add("ldflags", "/manifest", "/ManifestFile:" .. path.translate(sourcefile), {force = true}) + end end) |
