[*] guess-platform-code.lua now preserves filter stack

This commit is contained in:
Reece Wilson 2022-01-20 00:05:11 +00:00
parent 0cd24fbede
commit 7107098c12

View File

@ -1,5 +1,5 @@
local feature = function()
local excludeFiles = function(name, noFiles)
local function feature()
local function excludeFiles(name, noFiles)
if (not noFiles) then
excludes("**/*" .. name .. ".masm")
excludes("**/*" .. name .. ".*")
@ -7,23 +7,27 @@ local feature = function()
excludes("**/" .. name .. "/**")
end
filter(auFilterOf({notPlatforms = {"win32"}, notArchs = {"x86_64"}}))
auFilter(auFilterOf({notPlatforms = {"win32"}, notArchs = {"x86_64"}}))
excludeFiles "win64"
filter(auFilterOf({notPlatforms = {"win32"}}))
auFilter{}
auFilter(auFilterOf({notPlatforms = {"win32"}}))
excludeFiles "windows"
excludeFiles "win32"
filter(auFilterOf({notPlatforms = {"xbox"}}))
auFilter{}
auFilter(auFilterOf({notPlatforms = {"xbox"}}))
excludeFiles "xbox"
--if (not _G["uwp"]) then
excludeFiles "uwp"
filter(auFilterOf({notPlatforms = {"win32", "xbox"}}))
auFilter{}
auFilter(auFilterOf({notPlatforms = {"win32", "xbox"}}))
excludeFiles "nt"
filter(auFilterOf({notPlatforms = {"android"}}))
auFilter{}
auFilter(auFilterOf({notPlatforms = {"android"}}))
excludeFiles "android"
local isNotApple = {"mac",
@ -33,33 +37,40 @@ local feature = function()
"ps4",
"ps5"}, isNotApple)
filter(auFilterOf({notPlatforms = isNotBsd}))
auFilter{}
auFilter(auFilterOf({notPlatforms = isNotBsd}))
excludeFiles "bsd"
filter(auFilterOf({notPlatforms = isNotApple}))
auFilter{}
auFilter(auFilterOf({notPlatforms = isNotApple}))
excludeFiles "apple"
excludeFiles "xnu"
filter(auFilterOf({notPlatforms = {"mac"}}))
auFilter{}
auFilter(auFilterOf({notPlatforms = {"mac"}}))
excludeFiles "osx"
excludeFiles "macos"
local isNotLinux = {"linux",
"android"}
filter(auFilterOf({notPlatforms = auConcatArrays(isNotBsd, isNotLinux)}))
auFilter{}
auFilter(auFilterOf({notPlatforms = auConcatArrays(isNotBsd, isNotLinux)}))
excludeFiles "unix"
filter(auFilterOf({notPlatforms = {"linux", "android"}}))
auFilter{}
auFilter(auFilterOf({notPlatforms = {"linux", "android"}}))
excludeFiles "linux"
filter(auFilterOf({notArchs = "x86_64"}))
auFilter{}
auFilter(auFilterOf({notArchs = "x86_64"}))
excludeFiles "x64"
excludeFiles "x86_64"
excludeFiles "amd64"
filter(auFilterOf({notArchs = "x86_32"}))
auFilter{}
auFilter(auFilterOf({notArchs = "x86_32"}))
excludes "**/x86/**"
excludes "**/x86/**.c"
excludes "**/x86/**.h"
@ -71,19 +82,19 @@ local feature = function()
excludeFiles "x86_32"
excludeFiles "intel"
filter(auFilterOf({notArchs = "arm"}))
auFilter{}
auFilter(auFilterOf({notArchs = "arm"}))
excludeFiles ("arm", true)
excludeFiles "aarch64"
excludeFiles "aarch"
filter{}
auFilter{}
excludeFiles "mips"
excludeFiles "mips64"
excludeFiles "amiga"
excludeFiles "powerpc"
excludeFiles "riscv"
end
return feature