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 to LLVM's master branch (LLVM 7) #51966

Merged
merged 1 commit into from Jul 11, 2018

Conversation

Projects
None yet
@alexcrichton
Copy link
Member

alexcrichton commented Jul 1, 2018

Current status

Blocked on a performance regression. The performance regression has an upstream LLVM issue and has also been bisected to an LLVM revision.

Ready to merge!


This commit upgrades the main LLVM submodule to LLVM's current master branch.
The LLD submodule is updated in tandem as well as compiler-builtins.

Along the way support was also added for LLVM 7's new features. This primarily
includes the support for custom section concatenation natively in LLD so we now
add wasm custom sections in LLVM IR rather than having custom support in rustc
itself for doing so.

Some other miscellaneous changes are:

  • We now pass --gc-sections to wasm-ld
  • The optimization level is now passed to wasm-ld
  • A --stack-first option is passed to LLD to have stack overflow always cause
    a trap instead of corrupting static data
  • The wasm target for LLVM switched to wasm32-unknown-unknown.
  • The syntax for aligned pointers has changed in LLVM IR and tests are updated
    to reflect this.
  • The thumbv6m-none-eabi target is disabled due to an LLVM bug

Nowadays we've been mostly only upgrading whenever there's a major release of
LLVM but enough changes have been happening on the wasm target that there's been
growing motivation for quite some time now to upgrade out version of LLD. To
upgrade LLD, however, we need to upgrade LLVM to avoid needing to build yet
another version of LLVM on the builders.

The revision of LLVM in use here is arbitrarily chosen. We will likely need to
continue to update it over time if and when we discover bugs. Once LLVM 7 is
fully released we can switch to that channel as well.

cc #50543

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jul 1, 2018

r? @varkor

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jul 1, 2018

warning Warning warning

  • These commits modify submodules.
@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jul 1, 2018

cc @fitzgen for the LLD update
cc @japaric for the proposed removal of thumbv6m-none-eabi

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Jul 1, 2018

Your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:00:07] Submodule path 'src/doc/nomicon': checked out '13e3745ca399118df05e8261e12e3ada6e616b48'
[00:00:07] Submodule path 'src/doc/reference': checked out '0f63519ea10c028f48b2dbf7d0a2454203b68b0b'
[00:00:07] Submodule path 'src/jemalloc': checked out '1f5a28755e301ac581e2048011e4e0ff3da482ef'
[00:00:07] Submodule path 'src/libbacktrace': checked out 'f4d02bbdbf8a2c5a31f0801dfef597a86caad9e3'
[00:00:07] error: Server does not allow request for unadvertised object 2738f1b860f9fd90c819408c536be449edb6263d
[00:00:07] Fetched in submodule path 'src/libcompiler_builtins', but it did not contain 2738f1b860f9fd90c819408c536be449edb6263d. Direct fetching of that commit failed.
[00:00:08] Cleared directory 'src/dlmalloc'
[00:00:08] Submodule 'src/dlmalloc' (https://github.com/alexcrichton/dlmalloc-rs.git) unregistered for path 'src/dlmalloc'
[00:00:08] Cleared directory 'src/doc/nomicon'
[00:00:08] Submodule 'src/doc/nomicon' (https://github.com/rust-lang-nursery/nomicon.git) unregistered for path 'src/doc/nomicon'
---
[00:00:09] Submodule path 'src/doc/nomicon': checked out '13e3745ca399118df05e8261e12e3ada6e616b48'
[00:00:09] Submodule path 'src/doc/reference': checked out '0f63519ea10c028f48b2dbf7d0a2454203b68b0b'
[00:00:09] Submodule path 'src/jemalloc': checked out '1f5a28755e301ac581e2048011e4e0ff3da482ef'
[00:00:09] Submodule path 'src/libbacktrace': checked out 'f4d02bbdbf8a2c5a31f0801dfef597a86caad9e3'
[00:00:10] error: Server does not allow request for unadvertised object 2738f1b860f9fd90c819408c536be449edb6263d
[00:00:10] Fetched in submodule path 'src/libcompiler_builtins', but it did not contain 2738f1b860f9fd90c819408c536be449edb6263d. Direct fetching of that commit failed.
[00:00:12] Cleared directory 'src/dlmalloc'
[00:00:12] Submodule 'src/dlmalloc' (https://github.com/alexcrichton/dlmalloc-rs.git) unregistered for path 'src/dlmalloc'
[00:00:12] Cleared directory 'src/doc/nomicon'
[00:00:12] Submodule 'src/doc/nomicon' (https://github.com/rust-lang-nursery/nomicon.git) unregistered for path 'src/doc/nomicon'
---
[00:00:12] Submodule path 'src/doc/nomicon': checked out '13e3745ca399118df05e8261e12e3ada6e616b48'
[00:00:12] Submodule path 'src/doc/reference': checked out '0f63519ea10c028f48b2dbf7d0a2454203b68b0b'
[00:00:12] Submodule path 'src/jemalloc': checked out '1f5a28755e301ac581e2048011e4e0ff3da482ef'
[00:00:12] Submodule path 'src/libbacktrace': checked out 'f4d02bbdbf8a2c5a31f0801dfef597a86caad9e3'
[00:00:13] error: Server does not allow request for unadvertised object 2738f1b860f9fd90c819408c536be449edb6263d
[00:00:13] Fetched in submodule path 'src/libcompiler_builtins', but it did not contain 2738f1b860f9fd90c819408c536be449edb6263d. Direct fetching of that commit failed.
[00:00:16] Cleared directory 'src/dlmalloc'
[00:00:16] Submodule 'src/dlmalloc' (https://github.com/alexcrichton/dlmalloc-rs.git) unregistered for path 'src/dlmalloc'
[00:00:16] Cleared directory 'src/doc/nomicon'
[00:00:16] Submodule 'src/doc/nomicon' (https://github.com/rust-lang-nursery/nomicon.git) unregistered for path 'src/doc/nomicon'
---
[00:00:16] Submodule path 'src/doc/nomicon': checked out '13e3745ca399118df05e8261e12e3ada6e616b48'
[00:00:16] Submodule path 'src/doc/reference': checked out '0f63519ea10c028f48b2dbf7d0a2454203b68b0b'
[00:00:16] Submodule path 'src/jemalloc': checked out '1f5a28755e301ac581e2048011e4e0ff3da482ef'
[00:00:16] Submodule path 'src/libbacktrace': checked out 'f4d02bbdbf8a2c5a31f0801dfef597a86caad9e3'
[00:00:17] error: Server does not allow request for unadvertised object 2738f1b860f9fd90c819408c536be449edb6263d
[00:00:17] Fetched in submodule path 'src/libcompiler_builtins', but it did not contain 2738f1b860f9fd90c819408c536be449edb6263d. Direct fetching of that commit failed.
[00:00:21] Cleared directory 'src/dlmalloc'
[00:00:21] Submodule 'src/dlmalloc' (https://github.com/alexcrichton/dlmalloc-rs.git) unregistered for path 'src/dlmalloc'
[00:00:21] Cleared directory 'src/doc/nomicon'
[00:00:21] Submodule 'src/doc/nomicon' (https://github.com/rust-lang-nursery/nomicon.git) unregistered for path 'src/doc/nomicon'
---
[00:00:22] Submodule path 'src/doc/nomicon': checked out '13e3745ca399118df05e8261e12e3ada6e616b48'
[00:00:22] Submodule path 'src/doc/reference': checked out '0f63519ea10c028f48b2dbf7d0a2454203b68b0b'
[00:00:22] Submodule path 'src/jemalloc': checked out '1f5a28755e301ac581e2048011e4e0ff3da482ef'
[00:00:22] Submodule path 'src/libbacktrace': checked out 'f4d02bbdbf8a2c5a31f0801dfef597a86caad9e3'
[00:00:22] error: Server does not allow request for unadvertised object 2738f1b860f9fd90c819408c536be449edb6263d
[00:00:22] Fetched in submodule path 'src/libcompiler_builtins', but it did not contain 2738f1b860f9fd90c819408c536be449edb6263d. Direct fetching of that commit failed.
[00:00:22] The command has failed after 5 attempts.

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 1.
travis_time:start:0082b916
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:1f2c8970:start=1530464396701348861,finish=1530464396708568955,duration=7220094
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:13d11308
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:073bccfc
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@alexcrichton alexcrichton force-pushed the alexcrichton:llvm7 branch from f440272 to 1f687f4 Jul 1, 2018

@kennytm

This comment was marked as resolved.

Copy link
Member

kennytm commented Jul 1, 2018

The thumbv6m-none-eabi target is disabled due to an LLVM bug

Oops. cc @jamesmunns

@jamesmunns

This comment was marked as resolved.

Copy link
Member

jamesmunns commented Jul 1, 2018

Also CC @sekineh and @nerdyvaishali (they are working on the CI for these targets at the moment).

@alexcrichton do you know if only thumbv6m-none-eabi is affected? Or are other thumb* targets affected? Particularly:

  • thumbv7em-none-eabi
  • thumbv7em-none-eabihf
  • thumbv7m-none-eabi

I can help test if you would like.

We (embedded-wg) are still hoping to land thumb* targets as part of stable for the 2018 release, would this change (LLVM upgrade) be landing before or after that release?

@alexcrichton

This comment was marked as resolved.

Copy link
Member Author

alexcrichton commented Jul 1, 2018

@jamesmunns AFAIK it's just thumbv6m, although this is primarily just building libcore (not actually testing anything). I've verified that the other targets are able to compile libcore just fine and it's just the thumbv6m target that hits a bug. If y'all are familiar with LLVM though it may not be hard to fix!

I'm not sure yet if we'll want to land this without that target, but I wanted to mostly get the conversation started!

@alexcrichton

This comment was marked as resolved.

Copy link
Member Author

alexcrichton commented Jul 1, 2018

@jamesmunns a bisection of this bug points to https://reviews.llvm.org/D40922, although it may also not be the only issue blocking the thumbv6m target

OptLevel::Less => "-O1",
OptLevel::Default => "-O2",
OptLevel::Aggressive => "-O3",
OptLevel::Size => "-O2",

This comment has been minimized.

@varkor

varkor Jul 2, 2018

Member

If this is intentional, it'd be helpful to have a comment here to explain why -O2 is used for the size opt levels (as opposed to -Os and -Oz).

This comment has been minimized.

@alexcrichton

alexcrichton Jul 2, 2018

Author Member

Sure thing!

@varkor

This comment has been minimized.

Copy link
Member

varkor commented Jul 2, 2018

Everything looks reasonable to me, but it'd be better to have someone more familiar check over this.
r? @michaelwoerister

@gnzlbg

This comment was marked as resolved.

Copy link
Contributor

gnzlbg commented Jul 2, 2018

This: https://github.com/rust-lang/rust/blob/master/src/test/codegen/simd-intrinsic-float-minmax.rs#L37

Can be uncommented if the min-llvm-version on top is bumped to 7 as well. That fixes a bug in rustc and one in stdsimd.

@alexcrichton alexcrichton force-pushed the alexcrichton:llvm7 branch 2 times, most recently from abbd4fc to aa667e3 Jul 2, 2018

@japaric japaric referenced this pull request Jul 2, 2018

Closed

Embedded WG meeting, July 2 #110

@alexcrichton alexcrichton force-pushed the alexcrichton:llvm7 branch 2 times, most recently from 1e57200 to f29cd71 Jul 2, 2018

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jul 2, 2018

Now that https://bugs.llvm.org/show_bug.cgi?id=37382 is fixed I've updated to bring back the thumbv6m build

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jul 2, 2018

Oh one thing I forgot to mention in the OP as well is that there's a change to src/librustdoc/fold.rs which is a hack around either a bug in LLVM or a bug in our code generation. I was unable to reduce it down after a week or so of attempting various strategies, so I've opted to go ahead and apply the hack and see if we can find a reduced case in the wild.

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jul 2, 2018

@bors: try

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jul 2, 2018

⌛️ Trying commit f29cd71 with merge b77640f...

bors added a commit that referenced this pull request Jul 2, 2018

Auto merge of #51966 - alexcrichton:llvm7, r=<try>
Upgrade to LLVM's master branch (LLVM 7)

This commit upgrades the main LLVM submodule to LLVM's current master branch.
The LLD submodule is updated in tandem as well as compiler-builtins.

Along the way support was also added for LLVM 7's new features. This primarily
includes the support for custom section concatenation natively in LLD so we now
add wasm custom sections in LLVM IR rather than having custom support in rustc
itself for doing so.

Some other miscellaneous changes are:

* We now pass `--gc-sections` to `wasm-ld`
* The optimization level is now passed to `wasm-ld`
* A `--stack-first` option is passed to LLD to have stack overflow always cause
  a trap instead of corrupting static data
* The wasm target for LLVM switched to `wasm32-unknown-unknown`.
* The syntax for aligned pointers has changed in LLVM IR and tests are updated
  to reflect this.
* ~~The `thumbv6m-none-eabi` target is disabled due to an [LLVM bug][llbug]~~

Nowadays we've been mostly only upgrading whenever there's a major release of
LLVM but enough changes have been happening on the wasm target that there's been
growing motivation for quite some time now to upgrade out version of LLD. To
upgrade LLD, however, we need to upgrade LLVM to avoid needing to build yet
another version of LLVM on the builders.

The revision of LLVM in use here is arbitrarily chosen. We will likely need to
continue to update it over time if and when we discover bugs. Once LLVM 7 is
fully released we can switch to that channel as well.

[llbug]: https://bugs.llvm.org/show_bug.cgi?id=37382

cc #50543
@bors

This comment was marked as resolved.

Copy link
Contributor

bors commented Jul 2, 2018

💔 Test failed - status-travis

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Jul 2, 2018

The job dist-x86_64-linux of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_fold:end:services

travis_fold:start:git.checkout
travis_time:start:0a5d6fa6
$ git clone --depth=2 --branch=try https://github.com/rust-lang/rust.git rust-lang/rust
---
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/30/78/3ee2d1d05aadd79884402193c4d2967d042f29c941586ce450ce86fdc609/awscli-1.15.50-py2.py3-none-any.whl (1.3MB)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/db/c8/7dcf9dbcb22429512708fe3a547f8b6101c0d02137acbd892505aee57adf/colorama-0.3.9-py2.py3-none-any.whl
Collecting rsa<=3.5.0,>=3.1.2 (from awscli)
---
Requirement already satisfied: PyYAML<=3.12,>=3.10 in /usr/lib/python2.7/dist-packages (from awscli)
Collecting botocore==1.10.49 (from awscli)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/8d/10/488051d15156c325fec7347559dd4a54edc903d4cda9158f310a3e26e311/botocore-1.10.49-py2.py3-none-any.whl (4.4MB)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/50/09/c53398e0005b11f7ffb27b7aa720c617aba53be4fb4f4f3f06b9b5c60f28/docutils-0.14-py2-none-any.whl (543kB)
Collecting pyasn1>=0.1.3 (from rsa<=3.5.0,>=3.1.2->awscli)
---
[00:20:00] -- Looking for dlopen in dl
[00:20:00] -- Looking for dlopen in dl - found
[00:20:00] -- Looking for clock_gettime in rt
[00:20:00] -- Looking for clock_gettime in rt - found
[00:20:00] -- Looking for pfm_initialize in pfm
[00:20:00] -- Looking for pfm_initialize in pfm - not found
[00:20:01] -- Looking for pthread.h - found
[00:20:01] -- Looking for pthread_create
[00:20:01] -- Looking for pthread_create - not found
[00:20:01] -- Looking for pthread_create in pthreads
---
[00:21:00] [  2%] Building CXX object lib/MC/CMakeFiles/LLVMMC.dir/MCAsmMacro.cpp.o
[00:21:00] [  2%] Building CXX object lib/MC/CMakeFiles/LLVMMC.dir/MCAsmStreamer.cpp.o
[00:21:00] [  2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DAGDeltaAlgorithm.cpp.o
[00:21:01] [  2%] Building CXX object lib/MC/CMakeFiles/LLVMMC.dir/MCAssembler.cpp.o
[00:21:03] [  2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DJB.cpp.o
[00:21:04] [  2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ErrorHandling.cpp.o
[00:21:05] [  2%] Building CXX object lib/MC/CMakeFiles/LLVMMC.dir/MCCodeEmitter.cpp.o
[00:21:05] [  2%] Building CXX object lib/MC/CMakeFiles/LLVMMC.dir/MCCodePadder.cpp.o
[00:21:06] [  2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/FileUtilities.cpp.o
---
[00:22:02] [  8%] Building CXX object lib/MC/CMakeFiles/LLVMMC.dir/MCWasmObjectTargetWriter.cpp.o
[00:22:02] [  8%] Building CXX object lib/MC/CMakeFiles/LLVMMC.dir/MCWasmStreamer.cpp.o
[00:22:03] [  8%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/DAGISelMatcherGen.cpp.o
[00:22:03] [  8%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Unicode.cpp.o
[00:22:03] [  8%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/UnicodeCaseFold.cpp.o
[00:22:03] [  8%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/VersionTuple.cpp.o
[00:22:04] [  8%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/WithColor.cpp.o
[00:22:05] [  8%] Building CXX object lib/MC/CMakeFiles/LLVMMC.dir/MCWin64EH.cpp.o
[00:22:06] [  8%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/YAMLTraits.cpp.o
[00:22:07] [  8%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/DAGISelMatcherOpt.cpp.o
[00:22:07] [  8%] Building CXX object lib/MC/CMakeFiles/LLVMMC.dir/MCWinCOFFStreamer.cpp.o
---
[00:22:28] [ 10%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/GlobalISelEmitter.cpp.o
[00:22:29] [ 10%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Program.cpp.o
[00:22:30] [ 10%] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/COFFAsmParser.cpp.o
[00:22:31] In file included from /checkout/src/llvm/lib/Support/Program.cpp:79:
[00:22:31] /checkout/src/llvm/lib/Support/Unix/Program.inc:462:24: error: use of undeclared identifier '_POSIX_ARG_MAX'; did you mean '_SC_ARG_MAX'?
[00:22:31]   static long ArgMin = _POSIX_ARG_MAX;
[00:22:31]                        ^~~~~~~~~~~~~~
[00:22:31]                        _SC_ARG_MAX
[00:22:31] /usr/include/bits/confname.h:75:5: note: '_SC_ARG_MAX' declared here
[00:22:31]     _SC_ARG_MAX,
[00:22:31] 1 error generated.
[00:22:31] 1 error generated.
[00:22:31] gmake[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Program.cpp.o] Error 1
[00:22:31] gmake[1]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/all] Error 2
[00:22:31] gmake[1]: *** Waiting for unfinished jobs....
[00:22:33] [ 10%] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/ELFAsmParser.cpp.o
[00:22:35] [ 10%] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/MCAsmLexer.cpp.o
[00:22:35] [ 10%] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/MCAsmParser.cpp.o
[00:22:36] [ 10%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/InfoByHwMode.cpp.o
---
[00:22:40] [ 10%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/IntrinsicEmitter.cpp.o
[00:22:43] [ 10%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/OptParserEmitter.cpp.o
[00:22:45] [ 10%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/PredicateExpander.cpp.o
[00:22:45] [ 10%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/PseudoLoweringEmitter.cpp.o
[00:22:47] [ 10%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/RISCVCompressInstEmitter.cpp.o
[00:22:49] [ 11%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/RegisterInfoEmitter.cpp.o
[00:22:52] [ 11%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/SDNodeProperties.cpp.o
[00:22:52] [ 11%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/SearchableTableEmitter.cpp.o
[00:22:53] [ 11%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/SubtargetEmitter.cpp.o
---
[00:23:03] [ 11%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/X86RecognizableInstr.cpp.o
[00:23:03] [ 11%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/WebAssemblyDisassemblerEmitter.cpp.o
[00:23:05] [ 11%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/CTagsEmitter.cpp.o
[00:23:10] [ 11%] Built target obj.llvm-tblgen
[00:23:10] gmake: *** [all] Error 2
[00:23:10] command did not execute successfully, got: exit code: 2
[00:23:10] 
[00:23:10] 
[00:23:10] build script failed, must exit now', /cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.30/src/lib.rs:643:5
[00:23:10]  finished in 196.511
[00:23:10] travis_fold:end:llvm

[00:23:10] travis_time:end:llvm:start=1530569685893371040,finish=1530569882404891947,duration=196511520907
---
travis_time:end:00d5cc26:start=1530569883016777347,finish=1530569883023555253,duration=6777906
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:1e3047b8
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:04ed012b
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@glandium

This comment has been minimized.

Copy link
Contributor

glandium commented Jul 10, 2018

If I'm not mistaken, Clang/llvm 7 should release around september, which means it's going to release either right before rustc 1.29 is released, or right after. That's about the worst timing. So this bears the question: what about downstreams who build the rust compiler against a system llvm?

As for the perf regressions, AIUI, they are compiling time regressions, that's not all that interesting. I mean, as @nnethercote mentioned, compilers tend to slow down with time, mainly because of better optimization. So the compile time regressions should be weighted against the performance of the generated code. And sometimes there are bad surprises there, too.

@cuviper

This comment has been minimized.

Copy link
Member

cuviper commented Jul 10, 2018

This is not changing the minimum supported LLVM -- that was just bumped to LLVM 5 in #51899.

bors added a commit that referenced this pull request Jul 11, 2018

Auto merge of #51966 - alexcrichton:llvm7, r=michaelwoerister
Upgrade to LLVM's master branch (LLVM 7)

### Current status

~~Blocked on a [performance regression](#51966 (comment)). The performance regression has an [upstream LLVM issue](https://bugs.llvm.org/show_bug.cgi?id=38047) and has also [been bisected](https://reviews.llvm.org/D44282) to an LLVM revision.~~

Ready to merge!

---

This commit upgrades the main LLVM submodule to LLVM's current master branch.
The LLD submodule is updated in tandem as well as compiler-builtins.

Along the way support was also added for LLVM 7's new features. This primarily
includes the support for custom section concatenation natively in LLD so we now
add wasm custom sections in LLVM IR rather than having custom support in rustc
itself for doing so.

Some other miscellaneous changes are:

* We now pass `--gc-sections` to `wasm-ld`
* The optimization level is now passed to `wasm-ld`
* A `--stack-first` option is passed to LLD to have stack overflow always cause
  a trap instead of corrupting static data
* The wasm target for LLVM switched to `wasm32-unknown-unknown`.
* The syntax for aligned pointers has changed in LLVM IR and tests are updated
  to reflect this.
* ~~The `thumbv6m-none-eabi` target is disabled due to an [LLVM bug][llbug]~~

Nowadays we've been mostly only upgrading whenever there's a major release of
LLVM but enough changes have been happening on the wasm target that there's been
growing motivation for quite some time now to upgrade out version of LLD. To
upgrade LLD, however, we need to upgrade LLVM to avoid needing to build yet
another version of LLVM on the builders.

The revision of LLVM in use here is arbitrarily chosen. We will likely need to
continue to update it over time if and when we discover bugs. Once LLVM 7 is
fully released we can switch to that channel as well.

[llbug]: https://bugs.llvm.org/show_bug.cgi?id=37382

cc #50543
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jul 11, 2018

⌛️ Testing commit 42eb850 with merge ae5b629...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jul 11, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: michaelwoerister
Pushing ae5b629 to master...

@bors bors merged commit 42eb850 into rust-lang:master Jul 11, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

bors added a commit that referenced this pull request Jul 11, 2018

Auto merge of #52212 - kennytm:o3-again, r=<try>
Set opt-level = 3 the third time.

This PR reverts #51165 (set -O2 to fix #50867),
which reverted #50329 (set -O3),
which was second attempt of #48204 (set -O3, closed due to Windows segfault that is fixed now),
which reverted #42123 (set -O2 to fix spurious Windows segfaults),
which reverted #41967 (set -O3).

Last time we've found that setting -O3 regressed the wall time of NLL (#50329 (comment)), so we may need another perf run to confirm. I'd like to check this *after* the LLVM 7 upgrade #51966 has been merged, so marking this as <kbd>S-blocked</kbd> for now.

@alexcrichton alexcrichton deleted the alexcrichton:llvm7 branch Jul 11, 2018

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jul 11, 2018

Hm, this was a suspiciously smooth upgrade...

bors added a commit that referenced this pull request Jul 12, 2018

Auto merge of #52212 - kennytm:o3-again, r=alexcrichton
Set opt-level = 3 the third time.

This PR reverts #51165 (set -O2 for fixing #50867),
which reverted #50329 (set -O3),
which was second attempt of #48204 (set -O3, closed due to Windows segfault that is fixed now),
which reverted #42123 (set -O2 to fix spurious Windows segfaults),
which reverted #41967 (set -O3).

Since we have found the root cause of #50867, this optimization could be tried again.

Last time we've found that setting -O3 regressed the wall time of NLL (#50329 (comment)), so we may need another perf run to confirm. I'd like to check this *after* the LLVM 7 upgrade #51966 has been merged, so marking this as <kbd>S-blocked</kbd> for now.
@varkor

This comment has been minimized.

Copy link
Member

varkor commented Jul 12, 2018

llvm-rebuild-trigger wasn't modified as part of this PR, which was an oversight. Is it worth updating in a standalone PR, to ease the transition for anyone who isn't yet up to date with master?

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jul 12, 2018

Sure!

kennytm added a commit to kennytm/rust that referenced this pull request Jul 12, 2018

Rollup merge of rust-lang#52322 - varkor:llvm-7-rebuild-trigger, r=al…
…excrichton

Update llvm-rebuild-trigger in light of LLVM 7 upgrade

Not triggering a LLVM rebuild [since the LLVM 7 upgrade](rust-lang#51966 (comment)) causes builds of rustc to fail.

r? @alexcrichton

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jul 13, 2018

Rollup merge of rust-lang#52322 - varkor:llvm-7-rebuild-trigger, r=al…
…excrichton

Update llvm-rebuild-trigger in light of LLVM 7 upgrade

Not triggering a LLVM rebuild [since the LLVM 7 upgrade](rust-lang#51966 (comment)) causes builds of rustc to fail.

r? @alexcrichton

@alexcrichton alexcrichton referenced this pull request Jul 13, 2018

Closed

LLVM 7.0 tracking issue #50543

12 of 13 tasks complete

kennytm added a commit to kennytm/rust that referenced this pull request Jul 13, 2018

Rollup merge of rust-lang#52322 - varkor:llvm-7-rebuild-trigger, r=al…
…excrichton

Update llvm-rebuild-trigger in light of LLVM 7 upgrade

Not triggering a LLVM rebuild [since the LLVM 7 upgrade](rust-lang#51966 (comment)) causes builds of rustc to fail.

r? @alexcrichton

bors added a commit that referenced this pull request Jul 14, 2018

Auto merge of #52212 - kennytm:o3-again, r=alexcrichton
Set opt-level = 3 the third time.

This PR reverts #51165 (set -O2 for fixing #50867),
which reverted #50329 (set -O3),
which was second attempt of #48204 (set -O3, closed due to Windows segfault that is fixed now),
which reverted #42123 (set -O2 to fix spurious Windows segfaults),
which reverted #41967 (set -O3).

Since we have found the root cause of #50867, this optimization could be tried again.

Last time we've found that setting -O3 regressed the wall time of NLL (#50329 (comment)), so we may need another perf run to confirm. I'd like to check this *after* the LLVM 7 upgrade #51966 has been merged, so marking this as <kbd>S-blocked</kbd> for now.

@bradjc bradjc referenced this pull request Jul 23, 2018

Closed

RISCV Arch Support #36

4 of 7 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.