[*] Turns out half of the script hack was necessary for multi-arch
This commit is contained in:
parent
6620dd54f2
commit
1f8f43a8e1
@ -27,28 +27,42 @@ local function start()
|
||||
addTarget("target", Aurora.Platforms, _auCurrentPlatforms)
|
||||
addTarget("target", Aurora.Architectures, _auCurrentArchs)
|
||||
addTarget("flag", Aurora.Flags, _auCurrentFlags)
|
||||
_auExtendedArch = #_auCurrentArchs > 1
|
||||
end
|
||||
|
||||
local function startProject()
|
||||
auFilterForConfigPlatforms(function(config, platform, architecture)
|
||||
--_G.architecture("x86_64")
|
||||
auFilterForConfigPlatforms(function(config, platform)
|
||||
if (not _auExtendedArch) then
|
||||
local architecture = _auCurrentArchs[1]
|
||||
auFilter {}
|
||||
auFilter ("configurations:" .. config)
|
||||
_G.architecture(Aurora.Architectures[architecture].architecture)
|
||||
defines(Aurora.Platforms[platform].defines)
|
||||
else
|
||||
auFilter {}
|
||||
auForEach(_auCurrentArchs, function(architecture)
|
||||
auFilter ("configurations:" .. config .. architecture)
|
||||
_G.architecture(Aurora.Architectures[architecture].architecture)
|
||||
defines(Aurora.Platforms[platform].defines)
|
||||
auFilter {}
|
||||
end)
|
||||
auFilter ("platform:none")
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
local function startSolution()
|
||||
local configs = {}
|
||||
|
||||
if (not _auExtendedConfig and not _auExtendedArch) then
|
||||
if (not _auExtendedArch) then
|
||||
auForEach(Aurora.Settings.aNamesOfConfigs, function(config)
|
||||
table.insert(configs, config)
|
||||
end)
|
||||
else
|
||||
auForEach(_auCurrentPlatforms, function(platform)
|
||||
auForEach(_auCurrentArchs, function(arch)
|
||||
auForEach(Aurora.Settings.aNamesOfConfigs, function(config)
|
||||
table.insert(configs, platform .. arch .. config)
|
||||
end)
|
||||
table.insert(configs, config .. arch)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
@ -134,7 +148,13 @@ local function auFilterOf(configFilter, ...)
|
||||
return
|
||||
end
|
||||
|
||||
if (not _auExtendedArch) then
|
||||
table.insert(validConfigs, config)
|
||||
else
|
||||
auForEach(_auCurrentArchs, function(arch)
|
||||
table.insert(validConfigs, config .. arch)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
||||
auForEach(_auCurrentArchs, function(arch)
|
||||
@ -168,7 +188,7 @@ local function auFilterOf(configFilter, ...)
|
||||
if (#supportedArchs == 0) then
|
||||
table.insert(supportedArchs, "platforms:none")
|
||||
end
|
||||
ret = table.concat(supportedArchs, " or ")
|
||||
ret = {table.concat(supportedArchs, " or ")}
|
||||
|
||||
local supportedPlatforms = {}
|
||||
auForEach(validPlatforms, function(platform)
|
||||
@ -177,7 +197,7 @@ local function auFilterOf(configFilter, ...)
|
||||
if (#supportedPlatforms == 0) then
|
||||
table.insert(supportedPlatforms, "platforms:none")
|
||||
end
|
||||
ret = auConcatVararg(ret, {table.concat(supportedPlatforms, " or ")})
|
||||
ret = auMergeArray(ret, {table.concat(supportedPlatforms, " or ")})
|
||||
|
||||
|
||||
local supportedConfigs = {}
|
||||
@ -187,11 +207,11 @@ local function auFilterOf(configFilter, ...)
|
||||
if (#supportedConfigs == 0) then
|
||||
table.insert(supportedConfigs, "platforms:none")
|
||||
end
|
||||
ret = auConcatVararg(ret, {table.concat(supportedConfigs, " or ")})
|
||||
ret = auMergeArray(ret, {table.concat(supportedConfigs, " or ")})
|
||||
|
||||
--local ret = {table.concat(ret, " or ")}
|
||||
if (#andOptions) then
|
||||
ret = auConcatVararg(ret, andOptions)
|
||||
ret = auMergeArray(ret, andOptions)
|
||||
end
|
||||
|
||||
--print(json.encode(configFilter), json.encode(ret))
|
||||
|
@ -374,7 +374,8 @@ local function linkAuProject(dep, soft)
|
||||
end
|
||||
|
||||
local function addFeature(feature)
|
||||
print("adding feature ", feature)
|
||||
--print("adding feature ", feature)
|
||||
|
||||
local script = auGetRoot() .. "/Build_Scripts/Features/" .. feature:lower() .. ".lua"
|
||||
|
||||
if (not os.isfile(script)) then
|
||||
|
@ -25,7 +25,6 @@ function auStart()
|
||||
end
|
||||
|
||||
function auStartSolution(sln)
|
||||
auStart()
|
||||
auRequire("Core").solution.start(sln)
|
||||
end
|
||||
|
||||
@ -91,8 +90,14 @@ function auFilter(filter)
|
||||
else
|
||||
table.insert(tbl, filter)
|
||||
end
|
||||
--print("FILTERING ", json.encode(tbl), json.encode(filter))
|
||||
_G.filter(tbl)
|
||||
local filterArray = {}
|
||||
|
||||
auForEach(tbl, function(val)
|
||||
filterArray = auMergeArray(filterArray, val)
|
||||
end)
|
||||
|
||||
--print("FILTERING ", json.encode(filterArray), json.encode(filter))
|
||||
_G.filter(filterArray)
|
||||
end
|
||||
|
||||
function auLinkProject(...)
|
||||
|
Loading…
Reference in New Issue
Block a user