Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade LLVM #13513

Merged
merged 7 commits into from Apr 19, 2014
Merged

Upgrade LLVM #13513

merged 7 commits into from Apr 19, 2014

Commits on Apr 17, 2014

  1. Upgrade LLVM

    This comes with a number of fixes to be compatible with upstream LLVM:
    
    * Previously all monomorphizations of "mem::size_of()" would receive the same
      symbol. In the past LLVM would silently rename duplicated symbols, but it
      appears to now be dropping the duplicate symbols and functions now. The symbol
      names of monomorphized functions are now no longer solely based on the type of
      the function, but rather the type and the unique hash for the
      monomorphization.
    
    * Split stacks are no longer a global feature controlled by a flag in LLVM.
      Instead, they are opt-in on a per-function basis through a function attribute.
      The rust #[no_split_stack] attribute will disable this, otherwise all
      functions have #[split_stack] attached to them.
    
    * The compare and swap instruction now takes two atomic orderings, one for the
      successful case and one for the failure case. LLVM internally has an
      implementation of calculating the appropriate failure ordering given a
      particular success ordering (previously only a success ordering was
      specified), and I copied that into the intrinsic translation so the failure
      ordering isn't supplied on a source level for now.
    
    * Minor tweaks to LLVM's API in terms of debuginfo, naming, c++11 conventions,
      etc.
    alexcrichton committed Apr 17, 2014
    Copy the full SHA
    30ff17f View commit details
    Browse the repository at this point in the history
  2. configure: Enable libc++ with LLVM with clang

    When clang is enabled, also pass through --enable-libcpp to LLVM's configure
    command line to help it pick up the most recent c++ runtime library. This also
    changes the mklldeps.py script to pick up on whether LLVM was linked against
    stdc++ or c++ based on the --cxxflags that llvm-config prints.
    
    In an ongoing attempt to update LLVM, the bots need to update their C compilers
    to something that supports c++11 (LLVM recently switched). The OSX bots are
    running Lion (10.7), which only supports up to gcc 4.2 and clang 3.2. Apparently
    the libstdc++ is too old (even on the most updated command line tools) for LLVM,
    but using libc++ instead appears to work just fine.
    alexcrichton committed Apr 17, 2014
    Copy the full SHA
    32a81d1 View commit details
    Browse the repository at this point in the history
  3. configure: Enable clang for older OSX gcc versions

    OSX often has a more recent version of clang than it does for GCC. When an older
    version of gcc is detected on OSX, the --enable-clang flag is implicitly
    enabled.
    alexcrichton committed Apr 17, 2014
    Copy the full SHA
    682c401 View commit details
    Browse the repository at this point in the history
  4. etc: The --system-libs flag is LLVM 3.5+

    Older version of LLVM did not have this flag, so we need to fall back to our
    previous library detection when using older versions of LLVM.
    alexcrichton committed Apr 17, 2014
    Copy the full SHA
    36d5635 View commit details
    Browse the repository at this point in the history
  5. llvm: Add an option to statically link libstdc++

    The goal of the snapshot bots is to produce binaries which can run in as many
    locations as possible. Currently we build on Centos 6 for this reason, but with
    LLVM's update to C++11, this reduces the number of platforms that we could
    possibly run on.
    
    This adds a --enable-llvm-static-stdcpp option to the ./configure script for
    Rust which will enable building a librustc with a static dependence on
    libstdc++. This normally isn't necessary, but this option can be used on the
    snapshot builders in order to continue to make binaries which should be able to
    run in as many locations as possible.
    alexcrichton committed Apr 17, 2014
    Copy the full SHA
    acdee8b View commit details
    Browse the repository at this point in the history
  6. rustc: Hint to the linker about static/shared libs

    If a linker finds both a static and a dynamic version of the same library, then
    the linker often chooses the dynamic version. This is surprising when a native
    library is specified as being "static" in rust source. This modifies the linker
    command line to obey the hints given in rust source files and instructing the
    linker to prefer a particular version of a found library.
    
    Unfortunately, this patch has no effect on osx because the linker supports
    no such hint, and it also has no effect on windows because the linker apparently
    just ignores it. For now this is predominately used to enable the previous patch
    of linking to libstdc++ statically, but more support would need to be added for
    this in the future if we wanted to officially support it.
    
    cc rust-lang#12557 (doesn't close because it doesn't support OSX and windows)
    alexcrichton committed Apr 17, 2014
    4
    Copy the full SHA
    ad3de7f View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2014

  1. debuginfo: Clamp the maximum dwarf version to 3

    This is a consequence of rust-lang#13611 and our bots running a "fairly old" gdb which
    doesn't understand the newer versions of dwarf.
    alexcrichton committed Apr 18, 2014
    5
    Copy the full SHA
    426d701 View commit details
    Browse the repository at this point in the history