premake-core
premake-core copied to clipboard
Issue trying to fix x86 Linux build
I'm trying to fix the x86 Linux build as was reported here, as well as some other small issues I have. I found the bit of code that does the remapping, it's a function archFromConfig that looks like this:
function vstudio.archFromConfig(cfg, win32)
local isnative = project.isnative(cfg.project)
local arch = architecture(cfg.system, cfg.architecture)
if not arch then
arch = iif(isnative, "x86", "Any CPU")
end
if win32 and isnative and arch == "x86" then
arch = "Win32"
end
return arch
end
It looked like it should be pretty easy to change, but it turns out it's more complicated for some reason. I tried doing
if win32 and isnative and arch == "x86" and cfg.system ==p.WINDOWS then
and also tried
if win32 and isnative and arch == "x86" and cfg.system ~=p.LINUX then
but neither of those work, they break the windows platform that appears as <Platform>x86</Platform> instead of the current <Platform>Win32</Platform>
I notice that this function function vstudio.archFromConfig(cfg, win32) gets called with win32 set to true in many places, and I'm not sure what it means or why the system doesn't match what I'm trying to do. Any advice on how to move forward?