Test for no platform before inserting GCC flags

This commit is contained in:
starkos 2009-04-21 19:52:52 +00:00
parent 2bfb6c6fe3
commit fc705c245e

View File

@ -95,7 +95,9 @@
if (cfg.kind == "SharedLib" and not os.is("windows")) then
table.insert(result, "-fPIC")
end
table.insert(result, premake.gcc.platforms[cfg.platform].cflags)
if cfg.platform then
table.insert(result, premake.gcc.platforms[cfg.platform].cflags)
end
return result
end
@ -138,9 +140,12 @@
table.insert(result, "-s")
end
end
table.insert(result, premake.gcc.platforms[cfg.platform].cflags)
table.insert(result, premake.gcc.platforms[cfg.platform].ldflags)
if cfg.platform then
table.insert(result, premake.gcc.platforms[cfg.platform].cflags)
table.insert(result, premake.gcc.platforms[cfg.platform].ldflags)
end
return result
end