diff --git a/.gitmodules b/.gitmodules index cc0ae3d6d..26854023e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,6 @@ [submodule "third_party/ninja"] path = third_party/ninja url = git://github.com/martine/ninja.git -[submodule "third_party/llvm"] - path = third_party/llvm - url = http://llvm.org/git/llvm.git [submodule "third_party/gyp"] path = third_party/gyp url = https://github.com/benvanik/gyp.git diff --git a/common.gypi b/common.gypi index 43fde47d3..0dac659a5 100644 --- a/common.gypi +++ b/common.gypi @@ -12,59 +12,6 @@ 'library%': 'static_library', 'target_arch%': 'x64', - - # LLVM paths. - # TODO(benvanik): switch based on configuration. - 'llvm_path': 'build/llvm/release/', - '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', - ], }, 'target_defaults': { @@ -129,7 +76,6 @@ #'LinkIncremental': '1', # 1 = NO, 2 = YES 'TargetMachine': '17', # x86 - 64 'AdditionalLibraryDirectories': [ - '../../<(llvm_libdir)', ], #'AdditionalLibraryDirectories!': # ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'], @@ -155,7 +101,6 @@ 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', 'WARNING_CFLAGS': ['-Wall', '-Wendif-labels'], 'LIBRARY_SEARCH_PATHS': [ - '<@(llvm_libdir)', ], }, diff --git a/docs/building.md b/docs/building.md index a3c8481a9..95c1d40ee 100644 --- a/docs/building.md +++ b/docs/building.md @@ -26,19 +26,11 @@ Pretty much just install what's asked for as you try to `xb setup` or ### Windows * [Python 2.7](http://www.python.org/download/releases/2.7.3/) -* [CMake](http://www.cmake.org/cmake/resources/software.html) Install both and add Python to your PATH (`C:\Python27\`). Depending on your Visual Studio version you'll need to use one of the provided command prompts (until I write my own) to perform all `xenia-build` tasks. -There's a bug in VC++ that breaks with an internal error when building LLVM. -Change line 87 of include/llvm/ADT/StringExtras.h: -``` --static inline std::string utostr(uint64_t X, bool isNeg = false) { -+static __declspec(noinline) std::string utostr(uint64_t X, bool isNeg = false) { -``` - #### Visual Studio 2010 The build has been most tested with 2010. @@ -113,8 +105,8 @@ have the rebuild xenia and not all of the dependencies. #### nuke Cleans up xenia outputs as well as all dependencies. A full build will be -required after this - including LLVM - so only do this if you want to reclaim -your disk space or something is really wrong. +required after this so only do this if you want to reclaim your disk space or +something is really wrong. xb nuke diff --git a/private/runtest.sh b/private/runtest.sh index 28bf70f2f..134361d0c 100755 --- a/private/runtest.sh +++ b/private/runtest.sh @@ -18,15 +18,3 @@ fi --trace_instructions=false \ --abort_before_entry=true \ 1>build/run.txt - #2>build/run.llvm.txt \ - -if [ ! -s build/run.llvm.txt ]; then - rm build/run.llvm.txt -fi - -if [ -e build/$1-preopt.bc ]; then - ./build/llvm/release/bin/llvm-dis build/$1-preopt.bc -fi -if [ -e build/$1.bc ]; then - ./build/llvm/release/bin/llvm-dis build/$1.bc -fi diff --git a/src/xenia/cpu/sources.gypi b/src/xenia/cpu/sources.gypi index ea5eb5fb4..d96065515 100644 --- a/src/xenia/cpu/sources.gypi +++ b/src/xenia/cpu/sources.gypi @@ -23,7 +23,7 @@ ], 'includes': [ - 'llvmbe/sources.gypi', + #'llvmbe/sources.gypi', 'ppc/sources.gypi', 'sdb/sources.gypi', ], diff --git a/third_party/llvm b/third_party/llvm deleted file mode 160000 index c83f6212a..000000000 --- a/third_party/llvm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c83f6212a79af38f97bc78c44429c1ea3f3995cd diff --git a/tools/xenia-run/xenia-run.cc b/tools/xenia-run/xenia-run.cc index d4977046d..5f8542408 100644 --- a/tools/xenia-run/xenia-run.cc +++ b/tools/xenia-run/xenia-run.cc @@ -46,7 +46,7 @@ int Run::Setup() { xe_zero_struct(&pal_options, sizeof(pal_options)); XEEXPECTZERO(xe_pal_init(pal_options)); - backend_ = shared_ptr(new xe::cpu::llvmbe::LLVMBackend()); + //backend_ = shared_ptr(new xe::cpu::llvmbe::LLVMBackend()); debugger_ = shared_ptr(new Debugger()); diff --git a/xenia-build.py b/xenia-build.py index fb9f8c9e6..d1b7a47c0 100755 --- a/xenia-build.py +++ b/xenia-build.py @@ -180,9 +180,7 @@ def post_update_deps(config): Args: config: 'debug' or 'release'. """ - print '- building llvm...' - shell_call('ninja -C build/llvm/%s-obj/ install' % (config)) - print '' + pass class SetupCommand(Command): @@ -204,10 +202,6 @@ class SetupCommand(Command): shell_call('git submodule update') print '' - # LLVM needs to pull with --rebase. - # TODO(benvanik): any way to do this to just the submodule? - #shell_call('git config branch.master.rebase true') - # Disable core.filemode on Windows to prevent weird file mode diffs in git. # TODO(benvanik): check cygwin test - may be wrong when using Windows python if os.path.exists('/Cygwin.bat'): @@ -227,22 +221,6 @@ class SetupCommand(Command): shell_call('python third_party/ninja/bootstrap.py ' + extra_args) print '' - # Ensure cmake is present. - if not has_bin('cmake'): - print '- installing cmake...' - if has_bin('brew'): - shell_call('brew install cmake') - elif has_bin('apt-get'): - shell_call('sudo apt-get install cmake') - else: - print 'ERROR: need to install cmake, use:' - print 'http://www.cmake.org/cmake/resources/software.html' - print 'Run the Windows installer, select the \'Add to system path\'' - print 'option and restart your command prompt to ensure it\'s on the' - print 'PATH.' - return 1 - print '' - # Binutils. # TODO(benvanik): disable on Windows print '- binutils...' @@ -267,35 +245,6 @@ class SetupCommand(Command): os.chdir(cwd) print '' - # LLVM. - print '- preparing llvm...' - generator = '' - if False:#sys.platform == 'win32': - generator = 'Visual Studio 10 Win64' - else: - generator = 'Ninja' - def prepareLLVM(path, obj_path, mode): - os.chdir(cwd) - if not os.path.exists(path): - os.makedirs(path) - if not os.path.exists(obj_path): - os.makedirs(obj_path) - os.chdir(obj_path) - shell_call(' '.join([ - 'cmake', - '-G"%s"' % (generator), - '-DCMAKE_INSTALL_PREFIX:STRING=../../../%s' % (path), - '-DCMAKE_BUILD_TYPE:STRING=%s' % (mode), - '-DLLVM_TARGETS_TO_BUILD:STRING="X86;PowerPC;CppBackend"', - '-DLLVM_INCLUDE_EXAMPLES:BOOL=OFF', - '-DLLVM_INCLUDE_TESTS:BOOL=OFF', - '../../../third_party/llvm/', - ])) - os.chdir(cwd) - prepareLLVM('build/llvm/debug/', 'build/llvm/debug-obj/', 'Debug') - prepareLLVM('build/llvm/release/', 'build/llvm/release-obj/', 'Release') - print '' - post_update_deps('debug') post_update_deps('release') @@ -405,12 +354,6 @@ class BuildCommand(Command): debug = '--debug' in args config = 'debug' if debug else 'release' - # If there's no LLVM we may have been cleaned - run setup again. - if not os.path.exists('build/llvm/'): - print 'Missing LLVM, running setup...' - shell_call('python xenia-build.py setup') - print '' - print 'Building %s...' % (config) print '' diff --git a/xenia.gyp b/xenia.gyp index 3d28b8a3d..fd29466eb 100644 --- a/xenia.gyp +++ b/xenia.gyp @@ -27,34 +27,28 @@ 'direct_dependent_settings': { 'include_dirs': [ 'src/', - '<@(llvm_includedir)', ], 'target_conditions': [ ['_type=="shared_library"', { 'cflags': [ - '<(llvm_cxxflags)', ], }], ['_type=="executable"', { 'conditions': [ ['OS == "win"', { 'libraries': [ - '<@(llvm_libs)', 'wsock32', ], }], ['OS == "mac"', { 'xcode_settings': { 'OTHER_LDFLAGS': [ - '