def load_release_windows_settings(conf): """ Setup all compiler and linker settings shared over all windows configurations for the 'debug' configuration """ v = conf.env conf.load_windows_common_settings()
def load_release_windows_settings(conf): """ Setup all compiler and linker settings shared over all windows configurations for the 'debug' configuration """ v = conf.env conf.load_windows_common_settings()
def load_win_x64_vs2013_common_settings(ctx): env = ctx.env global PLATFORM # Attempt to detect the C++ compiler for VS 2013 ( msvs version 12.0 ) try: ctx.auto_detect_msvc_compiler('msvc 12.0', 'x64', '') except Exception as err: raise Errors.WafError( "Unable to find Visual Studio 2013 C++ compiler: {}".format( str(err))) # Detect the QT binaries ctx.find_qt5_binaries(PLATFORM) if ctx.options.use_uber_files: env['CFLAGS'] += ['/bigobj'] env['CXXFLAGS'] += ['/bigobj'] if not env['CODE_GENERATOR_PATH']: raise Errors.WafError( '[Error] AZ Code Generator path not set for target platform {}'. format(PLATFORM)) if not env['CRCFIX_PATH']: raise Errors.WafError( '[Error] CRCFix path not set for target platform {}'.format( PLATFORM)) conf.load_msvc_common_settings() conf.load_windows_common_settings() conf.load_cryengine_common_settings()
def load_performance_windows_settings(conf): """ Setup all compiler and linker settings shared over all windows configurations for the 'debug' configuration """ conf.load_windows_common_settings()
def load_win_x64_clang_common_settings(conf): """ Setup all compiler and linker settings shared over all win_x64_win_x64 configurations """ v = conf.env if not conf.find_program('clang', mandatory=False, silent_output=True): raise Errors.WafError("Unable to detect Clang for windows") v['PLATFORM'] = PLATFORM # Load MSVC settings for non-build stuff (AzCG, CrcFix, etc) # load_win_x64_win_x64_vs2017_common_settings(conf) conf.load_windows_common_settings() conf.load_win_x64_vs2017_common_settings() windows_kit = conf.options.win_vs2017_winkit try: _, _, _, system_includes, _, _ = conf.detect_msvc(windows_kit, True) except: Logs.warn( 'Unable to find Windows Kit {}, removing build target'.format( windows_kit)) conf.disable_target_platform(PLATFORM) return restricted_tool_list_macro_header = 'AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS=' restricted_tool_list_macro = restricted_tool_list_macro_header # Start with a blank platform slate conf.undefine('AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS') tool_list_macro_parts = conf.update_host_tool_env_for_restricted_platforms( 'win_x64_vs2015', v) if tool_list_macro_parts: restricted_tool_list_macro += ''.join(tool_list_macro_parts) if len(restricted_tool_list_macro) > len( restricted_tool_list_macro_header): v['DEFINES'] += [restricted_tool_list_macro] if len(restricted_tool_list_macro) > len( restricted_tool_list_macro_header): v['DEFINES'] += [restricted_tool_list_macro] # Remove MSVC/clang specific settings v['CFLAGS'] = [] v['CXXFLAGS'] = [] v['LINKFLAGS'] = [] # Linker v['CCLNK_SRC_F'] = v['CXXLNK_SRC_F'] = [] v['CCLNK_TGT_F'] = v['CXXLNK_TGT_F'] = '/OUT:' v['LIB_ST'] = '%s.lib' v['LIBPATH_ST'] = '/LIBPATH:%s' v['STLIB_ST'] = '%s.lib' v['STLIBPATH_ST'] = '/LIBPATH:%s' v['cprogram_PATTERN'] = '%s.exe' v['cxxprogram_PATTERN'] = '%s.exe' v['cstlib_PATTERN'] = '%s.lib' v['cxxstlib_PATTERN'] = '%s.lib' v['cshlib_PATTERN'] = '%s.dll' v['cxxshlib_PATTERN'] = '%s.dll' v['LINKFLAGS_cshlib'] = ['/DLL'] v['LINKFLAGS_cxxshlib'] = ['/DLL'] # AR Tools v['ARFLAGS'] = ['/NOLOGO'] v['AR_TGT_F'] = '/OUT:' # Delete the env variables so that they can be replaced with the clang versions del v['AR'] del v['CC'] del v['CXX'] del v['LINK'] conf.find_program('clang', var='CC', silent_output=True) conf.find_program('clang++', var='CXX', silent_output=True) conf.find_program('llvm-lib', var='AR', silent_output=True) conf.find_program('lld-link', var='LINK', silent_output=True) v['LINK_CC'] = v['LINK_CXX'] = v['LINK'] # Moved to platform.win_x64_clang.json """ clang_FLAGS = [ '-mcx16', '-msse3', '-Wno-macro-redefined', '-Wno-microsoft-cast', '-Wno-ignored-pragma-intrinsic', # Clang doens't need #pragma intrinsic anyway, so don't whine when one isn't recognized ] """ clang_FLAGS = [] # Path to clang.exe is [clang]/bin/clang.exe, but the include path is [clang]/lib/clang/7.0.0/include clang_include_path = os.path.join( os.path.dirname(os.path.dirname(v['CXX'])), 'lib', 'clang', CLANG_VERSION, 'include') system_includes = [clang_include_path] + system_includes # Treat all MSVC include paths as system headers for include in system_includes: clang_FLAGS += ['-isystem', include] v['CFLAGS'] += clang_FLAGS v['CXXFLAGS'] += clang_FLAGS # Moved to platform.win_x64_clang.json """ v['DEFINES'] += [ '_CRT_SECURE_NO_WARNINGS', '_CRT_NONSTDC_NO_WARNINGS', ] """ # Moved to platform.win_x64_clang.json """ v['LINKFLAGS'] += [ '/MACHINE:x64', '/MANIFEST', # Create a manifest file '/OPT:REF', '/OPT:ICF', # Always optimize for size, there's no reason not to '/LARGEADDRESSAWARE', # tell the linker that the application can handle addresses larger than 2 gigabytes. ] """ v['WINDOWS_CLANG_SUPPORTED'] = True conf.load_clang_common_settings() conf.load_cryengine_common_settings()