mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-13 18:53:43 +00:00
Deactivate RTTI (except in AtlasUI) on all platforms.
D2768 inherits from a Spidermonkey class, and SM is built without rtti. This won't compile unless we also compile without RTTI, and that diff is required for SM60. Further, windows was already compiling without RTTI and our coding conventions say to not use it, so this is more of a regularization. AtlasUI is left unaffected as WXWidgets uses it (and it's a dynamic library so separate enough to do that). Differential Revision: https://code.wildfiregames.com/D3104 This was SVN commit r24214.
This commit is contained in:
@@ -539,9 +539,11 @@ function setup_static_lib_project (project_name, rel_source_dirs, extern_libs, e
|
||||
table.insert(static_lib_names, project_name)
|
||||
end
|
||||
|
||||
if os.istarget("windows") then
|
||||
rtti "off"
|
||||
elseif os.istarget("macosx") and _OPTIONS["macosx-version-min"] then
|
||||
-- Deactivate Run Time Type Information. Performance of dynamic_cast is very poor.
|
||||
-- The exception to this principle is Atlas UI, which is not a static library.
|
||||
rtti "off"
|
||||
|
||||
if os.istarget("macosx") and _OPTIONS["macosx-version-min"] then
|
||||
xcodebuildsettings { MACOSX_DEPLOYMENT_TARGET = _OPTIONS["macosx-version-min"] }
|
||||
end
|
||||
end
|
||||
@@ -564,7 +566,6 @@ function setup_shared_lib_project (project_name, rel_source_dirs, extern_libs, e
|
||||
end
|
||||
|
||||
if os.istarget("windows") then
|
||||
rtti "off"
|
||||
links { "delayimp" }
|
||||
elseif os.istarget("macosx") and _OPTIONS["macosx-version-min"] then
|
||||
xcodebuildsettings { MACOSX_DEPLOYMENT_TARGET = _OPTIONS["macosx-version-min"] }
|
||||
@@ -985,6 +986,8 @@ function setup_main_exe ()
|
||||
|
||||
dependson { "Collada" }
|
||||
|
||||
rtti "off"
|
||||
|
||||
-- Platform Specifics
|
||||
if os.istarget("windows") then
|
||||
|
||||
@@ -992,8 +995,6 @@ function setup_main_exe ()
|
||||
-- from "lowlevel" static lib; must be added here to be linked in
|
||||
files { source_root.."lib/sysdep/os/win/error_dialog.rc" }
|
||||
|
||||
rtti "off"
|
||||
|
||||
linkoptions {
|
||||
-- wraps main thread in a __try block(see wseh.cpp). replace with mainCRTStartup if that's undesired.
|
||||
"/ENTRY:wseh_EntryPoint",
|
||||
@@ -1387,6 +1388,8 @@ function setup_tests()
|
||||
|
||||
dependson { "Collada" }
|
||||
|
||||
rtti "off"
|
||||
|
||||
-- TODO: should fix the duplication between this OS-specific linking
|
||||
-- code, and the similar version in setup_main_exe
|
||||
|
||||
@@ -1394,8 +1397,6 @@ function setup_tests()
|
||||
-- from "lowlevel" static lib; must be added here to be linked in
|
||||
files { source_root.."lib/sysdep/os/win/error_dialog.rc" }
|
||||
|
||||
rtti "off"
|
||||
|
||||
-- see wstartup.h
|
||||
linkoptions { "/INCLUDE:_wstartup_InitAndRegisterShutdown" }
|
||||
-- Enables console for the TEST project on Windows
|
||||
|
||||
Reference in New Issue
Block a user