diff options
| author | ruki <[email protected]> | 2023-01-29 22:17:44 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-01-29 22:18:08 +0800 |
| commit | d6f64cf2a51e2225afd292167e2baba6250233d0 (patch) | |
| tree | c88e57ade26172da5371402572e717ce43e285ac /xmake/rules | |
| parent | 0e533c28f85bf23b57a08709c9a845efad16ff45 (diff) | |
improve ldc
Diffstat (limited to 'xmake/rules')
| -rw-r--r-- | xmake/rules/dlang/build_optimization/config.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/rules/dlang/build_optimization/config.lua b/xmake/rules/dlang/build_optimization/config.lua index 0df57179b..c79d9f062 100644 --- a/xmake/rules/dlang/build_optimization/config.lua +++ b/xmake/rules/dlang/build_optimization/config.lua @@ -26,9 +26,9 @@ import("core.project.project") function _add_lto_optimization(target) if target:has_tool("dc", "ldc2") and target:has_tool("dcld", "ldc2") then target:add("dcflags", "-flto=thin", {force = true}) - target:add("ldflags", "-flto=thin", {force = true}) - target:add("shflags", "-flto=thin", {force = true}) - -- to use the link-time optimizer, -flto and optimization options should be specified at compile time and during the final link. + target:add("ldflags", "-flto=thin", "-defaultlib=phobos2-ldc-lto,druntime-ldc-lto", {force = true}) + target:add("shflags", "-flto=thin", "-defaultlib=phobos2-ldc-lto,druntime-ldc-lto", {force = true}) + -- to use the link-time optimizer, lto and optimization options should be specified at compile time and during the final link. -- @see https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html local optimize = target:get("optimize") if optimize then |
