Removing LLVM submodule and build information.

Code is still present until transitioned over to libjit.
This commit is contained in:
Ben Vanik 2013-05-19 09:29:22 -07:00
parent 0aa7d1ec05
commit 1ce68ca7fe
9 changed files with 5 additions and 149 deletions

3
.gitmodules vendored
View File

@ -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

View File

@ -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)',
],
},

View File

@ -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

View File

@ -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

View File

@ -23,7 +23,7 @@
],
'includes': [
'llvmbe/sources.gypi',
#'llvmbe/sources.gypi',
'ppc/sources.gypi',
'sdb/sources.gypi',
],

1
third_party/llvm vendored

@ -1 +0,0 @@
Subproject commit c83f6212a79af38f97bc78c44429c1ea3f3995cd

View File

@ -46,7 +46,7 @@ int Run::Setup() {
xe_zero_struct(&pal_options, sizeof(pal_options));
XEEXPECTZERO(xe_pal_init(pal_options));
backend_ = shared_ptr<Backend>(new xe::cpu::llvmbe::LLVMBackend());
//backend_ = shared_ptr<Backend>(new xe::cpu::llvmbe::LLVMBackend());
debugger_ = shared_ptr<Debugger>(new Debugger());

View File

@ -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 ''

View File

@ -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': [
'<!@(<(llvm_config) --libs all)',
],
},
}],
['OS == "linux"', {
'libraries': [
'-L../../../<@(llvm_libdir)/',
'<!@(<(llvm_config) --libs all)',
'-lpthread',
'-ldl',
],
@ -65,13 +59,11 @@
},
'cflags': [
'<(llvm_cxxflags)',
],
'include_dirs': [
'.',
'src/',
'<(llvm_includedir)',
],
'includes': [