Skip to content

Commit

Permalink
now depend on revision 127367 of branch LLVM 2.9
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5272 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information
lrz committed Mar 11, 2011
1 parent d992548 commit 9be9a37
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 22 deletions.
24 changes: 12 additions & 12 deletions README.rdoc
Expand Up @@ -16,22 +16,22 @@ http://macruby.org

=== Requirements

* An Intel machine. PowerPC machines are not supported anymore, but may still
work. An Intel 64-bit machine (Intel Core Duo 2) is recommended.
* An Intel 64-bit machine. PowerPC and Intel 32-bit machines are not supported
anymore, but may still work.

* Mac OS X 10.6 or later.

* LLVM ToT, compiled for both i386 and x86_64.
* LLVM ToT, compiled for x86_64.

LLVM is a moving target and breaks periodically. We recommend to install
revision tag 2.8, being sure to specify the correct C and C++ compilers through
environment variables.
revision 127367 of branch 2.9, being sure to specify the correct C and
C++ compilers through environment variables.

$ svn co https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_28 llvm-2.8
$ cd llvm-2.8
$ env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc CXX=/usr/bin/g++ ./configure --enable-bindings=none --enable-optimized --with-llvmgccdir=/tmp
$ env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc CXX=/usr/bin/g++ make
$ sudo env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc CXX=/usr/bin/g++ make install
$ svn co https://llvm.org/svn/llvm-project/llvm/branches/release_29@127367 llvm-2.9
$ cd llvm-2.9
$ env CC=/usr/bin/gcc CXX=/usr/bin/g++ ./configure --enable-bindings=none --enable-optimized --with-llvmgccdir=/tmp
$ env CC=/usr/bin/gcc CXX=/usr/bin/g++ make
$ sudo env CC=/usr/bin/gcc CXX=/usr/bin/g++ make install

Note that compiling LLVM can take quite a while. If you have a machine with
multiple cores, which is quite likely, you might want to speed up the process
Expand All @@ -40,14 +40,14 @@ http://macruby.org
option, where `N' stands for the number of cores you'd like to use. So for a
Core Duo the command would look like:

$ env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc CXX=/usr/bin/g++ make -j2
$ env CC=/usr/bin/gcc CXX=/usr/bin/g++ make -j2

If you would prefer to update an existing LLVM Subversion working copy you
need to be careful to remove any previous build files before you compile:

$ svn status --no-ignore | awk '{print $2}' | xargs rm -rf
$ svn revert -R .
$ svn switch https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_28
$ svn switch <repository-URL>

=== Build Instructions

Expand Down
2 changes: 1 addition & 1 deletion bridgesupport.cpp
Expand Up @@ -18,7 +18,7 @@
# include <llvm/Instructions.h>
# include <llvm/Intrinsics.h>
# include <llvm/Analysis/DebugInfo.h>
# if __SUPPORT_LLVM_29__
# if !defined(LLVM_TOT)
# include <llvm/Analysis/DIBuilder.h>
# endif
# include <llvm/ExecutionEngine/JIT.h>
Expand Down
6 changes: 3 additions & 3 deletions compiler.cpp
Expand Up @@ -150,7 +150,7 @@ RoxorCompiler *RoxorCompiler::shared = NULL;
RoxorCompiler::RoxorCompiler(bool _debug_mode)
{
assert(RoxorCompiler::module != NULL);
#if __SUPPORT_LLVM_29__
#if !defined(LLVM_TOT)
debug_info = new DIBuilder(*RoxorCompiler::module);
#else
debug_info = new DIFactory(*RoxorCompiler::module);
Expand Down Expand Up @@ -839,7 +839,7 @@ void
RoxorCompiler::attach_current_line_metadata(Instruction *insn)
{
if (fname != NULL) {
#if __SUPPORT_LLVM_29__
#if !defined(LLVM_TOT)
Value *args[] = {
ConstantInt::get(Int32Ty, current_line),
ConstantInt::get(Int32Ty, 0),
Expand Down Expand Up @@ -4892,7 +4892,7 @@ RoxorCompiler::set_fname(const char *_fname)
assert(strlen(dir) > 0);
assert(strlen(base) > 0);

#if __SUPPORT_LLVM_29__
#if !defined(LLVM_TOT)
debug_info->createCompileUnit(DW_LANG_Ruby, base, dir,
RUBY_DESCRIPTION, true, "", 1);
debug_compile_unit = DICompileUnit(debug_info->getCU());
Expand Down
2 changes: 1 addition & 1 deletion compiler.h
Expand Up @@ -79,7 +79,7 @@ class RoxorCompiler {
void generate_location_path(std::string &path, DILocation loc);

protected:
#if __SUPPORT_LLVM_29__
#if !defined(LLVM_TOT)
DIBuilder *debug_info;
#else
DIFactory *debug_info;
Expand Down
2 changes: 1 addition & 1 deletion debugger.cpp
Expand Up @@ -15,7 +15,7 @@
#include <llvm/Instructions.h>
#include <llvm/Intrinsics.h>
#include <llvm/Analysis/DebugInfo.h>
#if __SUPPORT_LLVM_29__
#if !defined(LLVM_TOT)
# include <llvm/Analysis/DIBuilder.h>
#endif
#include <llvm/ExecutionEngine/JIT.h>
Expand Down
2 changes: 1 addition & 1 deletion llvm.h
Expand Up @@ -17,7 +17,7 @@
#include <llvm/Instructions.h>
#include <llvm/Intrinsics.h>
#include <llvm/Analysis/DebugInfo.h>
#if __SUPPORT_LLVM_29__
#if !defined(LLVM_TOT)
# include <llvm/Analysis/DIBuilder.h>
#endif
#include <llvm/ExecutionEngine/JIT.h>
Expand Down
6 changes: 3 additions & 3 deletions vm.cpp
Expand Up @@ -21,7 +21,7 @@
# include <llvm/Instructions.h>
# include <llvm/PassManager.h>
# include <llvm/Analysis/DebugInfo.h>
# if __SUPPORT_LLVM_29__
# if !defined(LLVM_TOT)
# include <llvm/Analysis/DIBuilder.h>
# endif
# include <llvm/Analysis/Verifier.h>
Expand All @@ -38,7 +38,7 @@
# include <llvm/Transforms/Scalar.h>
# include <llvm/Transforms/IPO.h>
# include <llvm/Support/raw_ostream.h>
# if __SUPPORT_LLVM_29__
# if !defined(LLVM_TOT)
# include <llvm/Support/system_error.h>
# endif
# include <llvm/Support/PrettyStackTrace.h>
Expand Down Expand Up @@ -4935,7 +4935,7 @@ Init_PreVM(void)
const char *kernel_file = getenv("VM_KERNEL_PATH");
if (kernel_file != NULL) {
std::string err;
#if __SUPPORT_LLVM_29__
#if !defined(LLVM_TOT)
OwningPtr<MemoryBuffer> MB;
error_code errcode = MemoryBuffer::getFile(kernel_file, MB);
if (errcode) {
Expand Down

0 comments on commit 9be9a37

Please sign in to comment.