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

Update to LLVM 9 #19

Merged
merged 10 commits into from
Jul 11, 2019
Merged

Update to LLVM 9 #19

merged 10 commits into from
Jul 11, 2019

Commits on Jul 8, 2019

  1. Add accessors for MCSubtargetInfo CPU and Feature tables

    This is needed for `-C target-cpu=help` and `-C target-feature=help` in rustc
    bitshifter authored and nikic committed Jul 8, 2019
    Configuration menu
    Copy the full SHA
    5889534 View commit details
    Browse the repository at this point in the history
  2. Fix compile on dist-i686-linux builder

    If this lines are present then we apparently get errors [1] when compiling in
    the current [2] dist-i686-linux container. Attempts to upgrade both gcc and
    binutils did not fix the error, so it appears that this may just be a bug in the
    super old glibc we're using on the dist-i686-linux container.
    
    We don't actually need this code anyway, so just work around these issues by
    removing references to the `*64` functions. This'll get things compiling
    locally and shouldn't be a regression in functionality.
    
    [1]: https://travis-ci.org/rust-lang/rust/jobs/257578199
    [2]: https://github.com/rust-lang/rust/tree/eba9d7f08ce5c90549ee52337aca0010ad566f0d/src/ci/docker/dist-i686-linux
    alexcrichton authored and nikic committed Jul 8, 2019
    Configuration menu
    Copy the full SHA
    fd5f9e2 View commit details
    Browse the repository at this point in the history
  3. Disable checks for libatomic for now

    For whatever reason this is failing the i686-freebsd builder in the Rust repo
    as-of this red-hot moment. The build seems to work fine without it so let's just
    remove it for now and pray there's a better fix later.
    
    Although if you're reading this and know of a better fix, we'd love to remove
    this!
    alexcrichton authored and nikic committed Jul 8, 2019
    Configuration menu
    Copy the full SHA
    606b776 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    69cb0d1 View commit details
    Browse the repository at this point in the history
  5. Fix compile on dist-x86_64-linux builder

    Apparently glibc is so old it doesn't have the _POSIX_ARG_MAX constant. This
    shouldn't affect anything we use anyway though.
    
    https://travis-ci.org/rust-lang/rust/jobs/399333071
    alexcrichton authored and nikic committed Jul 8, 2019
    Configuration menu
    Copy the full SHA
    a4f3260 View commit details
    Browse the repository at this point in the history
  6. Compile with /MT on MSVC

    Can't seem to figure out how to do this without this patch...
    alexcrichton authored and nikic committed Jul 8, 2019
    Configuration menu
    Copy the full SHA
    accc618 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2019

  1. Fix compilation of sanitizers in Rust containers

    It's not entertirely clear why this is necessary but this is carrying
    over an old `compiler-rt` patch to ensure that `compiler-rt` compiles in
    our super ancient containers that we build sanitizers in. This ideally
    isn't the worst thing to keep with us going forward, but we'll see!
    alexcrichton authored and nikic committed Jul 11, 2019
    Configuration menu
    Copy the full SHA
    9670dbb View commit details
    Browse the repository at this point in the history
  2. Fix sanitizer build without O_CLOEXEC

    Define it to 0 if it doesn't exist.
    nikic committed Jul 11, 2019
    Configuration menu
    Copy the full SHA
    2902abd View commit details
    Browse the repository at this point in the history
  3. [SLP] Optimize getSpillCost(); NFCI

    For a given set of live values, the spill cost will always be the
    same for each call. Compute the cost once and multiply it by the
    number of calls.
    
    (I'm not sure this spill cost modeling makes sense if there are
    multiple calls, as the spill cost will likely be shared across
    calls in that case. But that's how it currently works.)
    
    llvm-svn: 365552
    nikic committed Jul 11, 2019
    Configuration menu
    Copy the full SHA
    ef83c04 View commit details
    Browse the repository at this point in the history
  4. [X86] -fno-plt: use GOT __tls_get_addr only if GOTPCRELX is enabled

    Summary:
    As of binutils 2.32, ld has a bogus TLS relaxation error when the GD/LD
    code sequence using R_X86_64_GOTPCREL (instead of R_X86_64_GOTPCRELX) is
    attempted to be relaxed to IE/LE (binutils PR24784). gold and lld are good.
    
    In gcc/config/i386/i386.md, there is a configure-time check of as/ld
    support and the GOT relaxation will not be used if as/ld doesn't support
    it:
    
        if (flag_plt || !HAVE_AS_IX86_TLS_GET_ADDR_GOT)
          return "call\t%P2";
        return "call\t{*%p2@GOT(%1)|[DWORD PTR %p2@GOT[%1]]}";
    
    In clang, -DENABLE_X86_RELAX_RELOCATIONS=OFF is the default. The ld.bfd
    bogus error can be reproduced with:
    
        thread_local int a;
        int main() { return a; }
    
    clang -fno-plt -fpic a.cc -fuse-ld=bfd
    
    GOTPCRELX gained relative good support in 2016, which is considered
    relatively new.  It is even difficult to conditionally default to
    -DENABLE_X86_RELAX_RELOCATIONS=ON due to cross compilation reasons. So
    work around the ld.bfd bug by only using GOT when GOTPCRELX is enabled.
    
    Reviewers: dalias, hjl.tools, nikic, rnk
    
    Reviewed By: nikic
    
    Subscribers: llvm-commits
    
    Tags: #llvm
    
    Differential Revision: https://reviews.llvm.org/D64304
    
    llvm-svn: 365752
    MaskRay authored and nikic committed Jul 11, 2019
    Configuration menu
    Copy the full SHA
    56b8425 View commit details
    Browse the repository at this point in the history