Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Makefile
*.ninja
*.ninja_deps
*.ninja_log
.vscode/

*.bbprojectsettings
Scratchpad.txt
Expand Down
17 changes: 0 additions & 17 deletions modules/gmakelegacy/tests/cpp/test_clang.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,6 @@ ifeq ($(config),debug)
]]
end

function suite.usesCorrectCompilersAndLinkTimeOptimizationViaFlag()
flags { "LinkTimeOptimization" }
make.cppConfigs(prj)
test.capture [[
ifeq ($(config),debug)
ifeq ($(origin CC), default)
CC = clang
endif
ifeq ($(origin CXX), default)
CXX = clang++
endif
ifeq ($(origin AR), default)
AR = llvm-ar
endif
]]
end

function suite.usesCorrectCompilersAndLinkTimeOptimizationViaAPI()
linktimeoptimization "On"
make.cppConfigs(prj)
Expand Down
8 changes: 0 additions & 8 deletions modules/vstudio/_preload.lua
Original file line number Diff line number Diff line change
Expand Up @@ -636,14 +636,6 @@
}
}

p.api.deprecateValue("flags", "MFC", 'Use `mfc` instead.',
function(value)
mfc("On")
end,
function(value)
mfc("Off")
end)

--
-- Register Android properties
--
Expand Down
14 changes: 1 addition & 13 deletions modules/vstudio/tests/cs2005/test_compiler_props.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,8 @@
--


function suite.treatWarningsAsErrors_onFatalWarningsFlag()
flags { "FatalWarnings" }
prepare()
test.capture [[
<DefineConstants></DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
]]
end


function suite.treatWarningsAsErrors_onFatalWarningsAPI()
fatalwarnings { "All" }
fatalwarnings "All"
prepare()
test.capture [[
<DefineConstants></DefineConstants>
Expand Down
50 changes: 0 additions & 50 deletions modules/vstudio/tests/vc200x/test_compiler_block.lua
Original file line number Diff line number Diff line change
Expand Up @@ -354,25 +354,6 @@
-- Verify the correct warnings settings are used when FatalWarnings are enabled.
--

function suite.runtimeLibraryIsDebug_onFatalWarningsViaFlag()
flags { "FatalWarnings" }
prepare()
test.capture [[
<Tool
Name="VCCLCompilerTool"
Optimization="0"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
WarnAsError="true"
DebugInformationFormat="0"
/>
]]
end


function suite.runtimeLibraryIsDebug_onFatalWarningsViaAPI()
fatalwarnings { "All" }
prepare()
Expand All @@ -396,25 +377,6 @@
-- Verify the correct warnings settings are used when no warnings are enabled.
--

function suite.runtimeLibraryIsDebug_onNoWarnings_whichDisablesAllOtherWarningsFlagsViaFlag()
flags { "FatalWarnings" }
warnings "Off"
prepare()
test.capture [[
<Tool
Name="VCCLCompilerTool"
Optimization="0"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="0"
DebugInformationFormat="0"
/>
]]
end


function suite.runtimeLibraryIsDebug_onNoWarnings_whichDisablesAllOtherWarningsFlagsViaAPI()
fatalwarnings { "All" }
warnings "Off"
Expand Down Expand Up @@ -608,18 +570,6 @@
-- Check the LinkTimeOptimization flag.
--

function suite.flags_onLinkTimeOptimizationViaFlag()
flags { "LinkTimeOptimization" }
prepare()
test.capture [[
<Tool
Name="VCCLCompilerTool"
Optimization="0"
WholeProgramOptimization="true"
]]

end

function suite.flags_onLinkTimeOptimization()
linktimeoptimization "On"
prepare()
Expand Down
24 changes: 0 additions & 24 deletions modules/vstudio/tests/vc2010/test_compile_settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -150,19 +150,6 @@
-- not be generated.
--

function suite.warningLevel_onNoWarningsOverOtherWarningsFlags()
flags { "FatalWarnings" }
warnings "Off"
prepare()
test.capture [[
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
<Optimization>Disabled</Optimization>
]]
end


function suite.warningLevel_onNoWarningsOverOtherWarningsAPI()
fatalwarnings { "All" }
warnings "Off"
Expand Down Expand Up @@ -558,17 +545,6 @@
-- Add <TreatWarningAsError> if FatalWarnings flag is set.
--

function suite.treatWarningsAsError_onFatalWarningsViaFlag()
flags { "FatalCompileWarnings" }
prepare()
test.capture [[
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
]]
end


function suite.treatWarningsAsError_onFatalWarningsViaAPI()
fatalwarnings { "All" }
Expand Down
36 changes: 0 additions & 36 deletions modules/vstudio/tests/vc2010/test_config_props.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,6 @@
]]
end

function suite.useOfMfc_onDynamicRuntimeViaFlag()
flags { "MFC" }
prepare()
test.capture [[
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<UseOfMfc>Dynamic</UseOfMfc>
]]
end

function suite.useOfMfc_onStaticRuntime()
mfc "On"
staticruntime "On"
Expand All @@ -207,18 +196,6 @@
]]
end

function suite.useOfMfc_onStaticRuntimeViaFlag()
flags { "MFC" }
staticruntime "On"
prepare()
test.capture [[
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<UseOfMfc>Static</UseOfMfc>
]]
end

function suite.useOfMfc_forceStatic()
mfc "Static"
prepare()
Expand Down Expand Up @@ -338,19 +315,6 @@
-- Check the LinkTimeOptimization flag
--

function suite.useOfLinkTimeOptimizationViaFlag()
flags { "LinkTimeOptimization" }
prepare()
test.capture [[
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
]]
end

function suite.useOfLinkTimeOptimizationViaAPI()
linktimeoptimization "On"
prepare()
Expand Down
4 changes: 2 additions & 2 deletions modules/vstudio/tests/vc2010/test_link.lua
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@

function suite.fatalWarnings_onDynamicLink()
kind "ConsoleApp"
flags { "FatalLinkWarnings" }
linkerfatalwarnings "All"
prepare()
test.capture [[
<Link>
Expand All @@ -662,7 +662,7 @@

function suite.fatalWarnings_onStaticLink()
kind "StaticLib"
flags { "FatalLinkWarnings" }
linkerfatalwarnings "All"
prepare()
test.capture [[
<Link>
Expand Down
26 changes: 0 additions & 26 deletions modules/xcode/tests/test_xcode_project.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2945,32 +2945,6 @@
end


function suite.XCBuildConfigurationProject_OnFatalWarningsViaFlag()
flags { "FatalWarnings" }
prepare()
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
test.capture [[
A14350AC4595EE5E57CE36EC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
GCC_OPTIMIZATION_LEVEL = 0;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OBJROOT = obj/Debug;
ONLY_ACTIVE_ARCH = NO;
SYMROOT = bin/Debug;
};
name = Debug;
};
]]
end


function suite.XCBuildConfigurationProject_OnFatalWarningsViaAPI()
fatalwarnings { "All" }
linkerfatalwarnings { "All" }
Expand Down
2 changes: 1 addition & 1 deletion premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@

-- MinGW AR does not handle LTO out of the box and need a plugin to be setup
filter { "system:windows", "configurations:Release", "toolset:not mingw" }
flags { "LinkTimeOptimization" }
linktimeoptimization "On"

filter { "system:windows", "configurations:Release", "toolset:clang", "action:not vs*" }
linkoptions { "-fuse-ld=lld" }
Expand Down
37 changes: 0 additions & 37 deletions src/_premake_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,7 @@
"DebugEnvsDontMerge",
"DebugEnvsInherit",
"ExcludeFromBuild",
"FatalCompileWarnings", -- DEPRECATED
"FatalLinkWarnings", -- DEPRECATED
"FatalWarnings", -- DEPRECATED
"LinkTimeOptimization", -- DEPRECATED
"Maps",
"MFC",
"MultiProcessorCompile",
"No64BitChecks",
"NoCopyLocal",
Expand Down Expand Up @@ -1133,15 +1128,6 @@
}
}

--27 November 2024
api.deprecateValue("flags", "LinkTimeOptimization", "Use `linktimeoptimization` instead.",
function(value)
linktimeoptimization("On")
end,
function(value)
linktimeoptimization("Default")
end)

--25 November 2024
api.deprecateValue("flags", "WPF", 'Use `dotnetsdk "WindowsDesktop"` instead.',
function(value)
Expand All @@ -1150,29 +1136,6 @@
function(value)
dotnetsdk "Default"
end)
api.deprecateValue("flags", "FatalWarnings", "Use `fatalwarnings { \"All\" }` instead.",
function(value)
fatalwarnings({ "All" })
end,
function(value)
removefatalwarnings({ "All" })
end)

api.deprecateValue("flags", "FatalCompileWarnings", "Use `fatalwarnings { \"All\" }` instead.",
function(value)
fatalwarnings({ "All" })
end,
function(value)
removefatalwarnings({ "All" })
end)

api.deprecateValue("flags", "FatalLinkWarnings", "Use `linkerfatalwarnings { \"All\" }` instead.",
function(value)
linkerfatalwarnings({ "All" })
end,
function(value)
removelinkerfatalwarnings({ "All" })
end)

premake.filterFatalWarnings = function(tbl)
if type(tbl) == "table" then
Expand Down
18 changes: 0 additions & 18 deletions tests/tools/test_gcc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,6 @@
test.contains({ "-Weverything" }, gcc.getcflags(cfg))
end

function suite.cflags_onFatalWarningsViaFlag()
flags { "FatalWarnings" }
prepare()
test.contains({ "-Werror" }, gcc.getcflags(cfg))
end

function suite.cflags_onFatalWarningsViaAPI()
fatalwarnings { "All" }
prepare()
Expand Down Expand Up @@ -957,24 +951,12 @@ end
-- Check handling of link time optimization flag.
--

function suite.cflags_onLinkTimeOptimizationViaFlag()
flags "LinkTimeOptimization"
prepare()
test.contains("-flto", gcc.getcflags(cfg))
end

function suite.cflags_onLinkTimeOptimizationViaAPI()
linktimeoptimization "On"
prepare()
test.contains("-flto", gcc.getcflags(cfg))
end

function suite.ldflags_onLinkTimeOptimizationViaFlag()
flags "LinkTimeOptimization"
prepare()
test.contains("-flto", gcc.getldflags(cfg))
end

function suite.ldflags_onLinkTimeOptimizationViaAPI()
linktimeoptimization "On"
prepare()
Expand Down
Loading