GYP updates for Windows.

This will break OSX for a moment.
This commit is contained in:
Ben Vanik 2013-01-30 02:19:38 -08:00
parent f86f3fd8b9
commit 94d55b5056
4 changed files with 132 additions and 25 deletions

View File

@ -14,6 +14,54 @@
# TODO(benvanik): switch based on configuration. # TODO(benvanik): switch based on configuration.
'llvm_path': 'build/llvm/release/', 'llvm_path': 'build/llvm/release/',
'llvm_config': '<(llvm_path)bin/llvm-config', 'llvm_config': '<(llvm_path)bin/llvm-config',
'llvm_includedir': '<(llvm_path)/include',
'llvm_cxxflags': [
# ?
],
'llvm_libdir': '<(llvm_path)/lib',
'llvm_libs': [
#'pthread',
'LLVMCppBackendCodeGen',
'LLVMCppBackendInfo',
'LLVMAsmParser',
'LLVMTableGen',
'LLVMDebugInfo',
'LLVMX86Disassembler',
'LLVMX86AsmParser',
'LLVMX86CodeGen',
'LLVMSelectionDAG',
'LLVMAsmPrinter',
'LLVMX86Desc',
'LLVMX86Info',
'LLVMX86AsmPrinter',
'LLVMX86Utils',
'LLVMMCDisassembler',
'LLVMMCParser',
'LLVMInstrumentation',
'LLVMOption',
'LLVMArchive',
'LLVMBitReader',
'LLVMInterpreter',
'LLVMipo',
'LLVMVectorize',
'LLVMLinker',
'LLVMBitWriter',
'LLVMMCJIT',
'LLVMJIT',
'LLVMCodeGen',
'LLVMScalarOpts',
'LLVMInstCombine',
'LLVMTransformUtils',
'LLVMipa',
'LLVMAnalysis',
'LLVMRuntimeDyld',
'LLVMExecutionEngine',
'LLVMTarget',
'LLVMMC',
'LLVMObject',
'LLVMCore',
'LLVMSupport',
],
}, },
@ -32,7 +80,71 @@
], ],
'configurations': { 'configurations': {
'common_base': {
'abstract': 1,
'msvs_configuration_platform': 'x64',
'msvs_configuration_attributes': {
'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
'CharacterSet': '1',
},
'msvs_disabled_warnings': [],
'msvs_configuration_platform': 'x64',
'msvs_cygwin_shell': '0',
'msvs_settings': {
'VCCLCompilerTool': {
#'MinimalRebuild': 'false',
'BufferSecurityCheck': 'true',
'EnableFunctionLevelLinking': 'true',
'RuntimeTypeInfo': 'false',
'WarningLevel': '3',
#'WarnAsError': 'true',
'DebugInformationFormat': '3',
'ExceptionHandling': '1', # /EHsc
'AdditionalOptions': ['/MP'],
},
#'VCLibrarianTool': {
# 'AdditionalLibraryDirectories!':
# ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
# 'AdditionalLibraryDirectories':
# ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
#},
'VCLinkerTool': {
'GenerateDebugInformation': 'true',
#'LinkIncremental': '1', # 1 = NO, 2 = YES
'TargetMachine': '17', # x86 - 64
'AdditionalLibraryDirectories': [
'../../<(llvm_libdir)',
],
#'AdditionalLibraryDirectories!':
# ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
#'AdditionalLibraryDirectories':
# ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
},
},
'scons_settings': {
'sconsbuild_dir': '<(DEPTH)/build/xenia/',
},
'xcode_settings': {
'SYMROOT': '<(DEPTH)/build/xenia/',
'ALWAYS_SEARCH_USER_PATHS': 'NO',
'ARCHS': ['x86_64'],
'GCC_C_LANGUAGE_STANDARD': 'c99',
'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES',
'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES',
'WARNING_CFLAGS': ['-Wall', '-Wendif-labels'],
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES',
},
'defines': [
],
},
'debug': { 'debug': {
'inherit_from': ['common_base',],
'defines': [ 'defines': [
'DEBUG', 'DEBUG',
], ],
@ -58,7 +170,12 @@
'GCC_OPTIMIZATION_LEVEL': '0', 'GCC_OPTIMIZATION_LEVEL': '0',
}, },
}, },
'debug_x64': {
'inherit_from': ['debug',],
},
'release': { 'release': {
'inherit_from': ['common_base',],
'defines': [ 'defines': [
'RELEASE', 'RELEASE',
'NDEBUG', 'NDEBUG',
@ -86,22 +203,9 @@
}, },
}, },
}, },
'release_x64': {
'inherit_from': ['release',],
}, },
'msvs_configuration_platform': 'x64',
'msvs_cygwin_shell': '0',
'scons_settings': {
'sconsbuild_dir': '<(DEPTH)/build/xenia/',
},
'xcode_settings': {
'SYMROOT': '<(DEPTH)/build/xenia/',
'ALWAYS_SEARCH_USER_PATHS': 'NO',
'ARCHS': ['x86_64'],
'GCC_C_LANGUAGE_STANDARD': 'c99',
'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES',
'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES',
'WARNING_CFLAGS': ['-Wall', '-Wendif-labels'],
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES',
}, },
}, },
} }

View File

@ -1272,8 +1272,9 @@ XEEMITTER(rlwinmx, 0x54000000, M )(FunctionGenerator& g, IRBuilder<>& b, I
// Which seems to just select some bits and set cr0 for use with a branch. // Which seems to just select some bits and set cr0 for use with a branch.
// We can detect this and do less work. // We can detect this and do less work.
if (!i.M.SH) { if (!i.M.SH) {
Value* v = b.CreateAnd(b.CreateTrunc(g.gpr_value(i.M.RT), b.getInt32Ty()), Value* v = b.CreateAnd(
b.getInt32(XEMASK(i.M.MB + 32, i.M.ME + 32))); b.CreateTrunc(g.gpr_value(i.M.RT), b.getInt32Ty()),
b.getInt32((uint32_t)XEMASK(i.M.MB + 32, i.M.ME + 32)));
v = b.CreateZExt(v, b.getInt64Ty()); v = b.CreateZExt(v, b.getInt64Ty());
g.update_gpr_value(i.M.RA, v); g.update_gpr_value(i.M.RA, v);
if (i.M.Rc) { if (i.M.Rc) {

View File

@ -19,6 +19,7 @@
'defines': [ 'defines': [
'GFLAGS_DLL_DECL=', 'GFLAGS_DLL_DECL=',
'GFLAGS_DLL_DEFINE_FLAG=', 'GFLAGS_DLL_DEFINE_FLAG=',
'GFLAGS_DLL_DECLARE_FLAG=',
], ],
}], }],
], ],
@ -48,6 +49,7 @@
'defines': [ 'defines': [
'GFLAGS_DLL_DECL=', 'GFLAGS_DLL_DECL=',
'GFLAGS_DLL_DEFINE_FLAG=', 'GFLAGS_DLL_DEFINE_FLAG=',
'GFLAGS_DLL_DECLARE_FLAG=',
], ],
}], }],
], ],

View File

@ -74,18 +74,18 @@
'direct_dependent_settings': { 'direct_dependent_settings': {
'include_dirs': [ 'include_dirs': [
'<!@(<(llvm_config) --includedir)', '<@(llvm_includedir)',
], ],
'target_conditions': [ 'target_conditions': [
['_type=="shared_library"', { ['_type=="shared_library"', {
'cflags': [ 'cflags': [
'<!@(<(llvm_config) --cxxflags)' '<(llvm_cxxflags)',
], ],
}], }],
['_type=="executable"', { ['_type=="executable"', {
'libraries': [ 'libraries': [
#'<!@(<(llvm_config) --libs all)', '<@(llvm_libs)',
], ],
'library_dirs': [ 'library_dirs': [
# NOTE: this doesn't actually do anything... # NOTE: this doesn't actually do anything...
@ -94,8 +94,8 @@
], ],
'xcode_settings': { 'xcode_settings': {
'OTHER_LDFLAGS': [ 'OTHER_LDFLAGS': [
'<!@(<(llvm_config) --ldflags)', #'<!@(<(llvm_config) --ldflags)',
'<!@(<(llvm_config) --libs all)', #'<!@(<(llvm_config) --libs all)',
], ],
}, },
}], }],
@ -103,13 +103,13 @@
}, },
'cflags': [ 'cflags': [
'<!@(<(llvm_config) --cxxflags)' '<(llvm_cxxflags)',
], ],
'include_dirs': [ 'include_dirs': [
'.', '.',
'src/', 'src/',
'<!@(<(llvm_config) --includedir)', '<(llvm_includedir)',
], ],
'includes': [ 'includes': [