Commit 3c62219a authored by Drew's avatar Drew

Un-deprecate WMO setting

We can't enable WMO for Release on Linux yet, see https://github.com/AnarchyTools/atbuild/issues/110
parent 8f797026
Pipeline #2188 passed with stage
in 7 minutes and 9 seconds
...@@ -620,9 +620,7 @@ final class ATllbuild : Tool { ...@@ -620,9 +620,7 @@ final class ATllbuild : Tool {
var enableWMO: Bool var enableWMO: Bool
if let wmo = task[Options.WholeModuleOptimization.rawValue]?.bool { if let wmo = task[Options.WholeModuleOptimization.rawValue]?.bool {
enableWMO = wmo enableWMO = wmo
print("wmo is deprecated. Please use --configuration release instead.") //we can't deprecate WMO due to a bug in swift-preview-1 that prevents it from being useable in some cases on Linux
print("If you aren't able to migrate to --configuration, please file a bug with your usecase at https://github.com/AnarchyTools/atbuild/issues")
sleep(5)
} }
else { enableWMO = false } else { enableWMO = false }
...@@ -640,8 +638,15 @@ final class ATllbuild : Tool { ...@@ -640,8 +638,15 @@ final class ATllbuild : Tool {
if currentConfiguration.optimize == true { if currentConfiguration.optimize == true {
compileOptions.append("-O") compileOptions.append("-O")
switch(Platform.buildPlatform) {
case .Linux:
//don't enable WMO on Linux
//due to bug in swift-preview-1
break
default:
enableWMO = true enableWMO = true
} }
}
if task[Options.Magic.rawValue] != nil { if task[Options.Magic.rawValue] != nil {
print("Warning: Magic is deprecated. Please migrate to --configuration none. If --configuration none won't work for your usecase, file a bug at https://github.com/AnarchyTools/atbuild/issues") print("Warning: Magic is deprecated. Please migrate to --configuration none. If --configuration none won't work for your usecase, file a bug at https://github.com/AnarchyTools/atbuild/issues")
sleep(5) sleep(5)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment