Skip to content
New issue

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

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

Already on GitHub? # to your account

Remove few LLVMRust...() methods instead use LLVM C-API. #67353

Closed
wants to merge 22 commits into from

Conversation

vivekvpandya
Copy link

Remove following methods
LLVMRustBuildCleanupPad()
LLVMRustBuildCleanupRet()
LLVMRustBuildCatchPad()
LLVMRustBuildCatchRet()
LLVMRustBuildCatchSwitch()
from llvmrust/RustWrapper.cpp as after https://reviews.llvm.org/D45100
requied C API are avaliable in LLVM.
r? @alexcrichton
#46437

  LLVMRustBuildCleanupPad()
  LLVMRustBuildCleanupRet()
  LLVMRustBuildCatchPad()
  LLVMRustBuildCatchRet()
  LLVMRustBuildCatchSwitch()
from llvmrust/RustWrapper.cpp as after https://reviews.llvm.org/D45100
requied C API are avaliable in LLVM.
r? @alexcrichton
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 16, 2019
@hanna-kruppe
Copy link
Contributor

LGTM, thanks!

For the record: D45100 is in LLVM 7 (see llvm/llvm-project@478fce9) which is our current minimum supported LLVM version.

@bors r+

@bors
Copy link
Contributor

bors commented Dec 16, 2019

📌 Commit 7ec9dc7 has been approved by rkruppe

@bors
Copy link
Contributor

bors commented Dec 16, 2019

🌲 The tree is currently closed for pull requests below priority 100, this pull request will be tested once the tree is reopened

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 16, 2019
ranma42 and others added 21 commits December 18, 2019 21:11
The comparison can be performed on the raw bytes, as the chars can
only match if their UTF8 encoding matches.

This avoids the `is_char_boundary` checks and translates to a straight
`u8` slice comparison which is optimized to a memcmp or inline
comparison where appropriate.
This enables constant folding when matching a literal char.

Fixes rust-lang#41993.
.gitignore should not ignore files that exist in the repository. The
ignore of .cargo applies to the committed .cargo directory used in an
example:

$ git ls-files --exclude-standard --ignored
src/test/run-make/thumb-none-qemu/example/.cargo/config

Explicitly un-ignore that file.
This avoids the problems of high thread counts (i.e., contention in the
kernel on the jobserver pipe due to thundering herd of readers) while
stil giving rustc some parallelism to work with.
This also removes the unused NO_PARALLEL_COMPILER flag; if we want that
functionality we can readd it but this makes sure we really are parallel
everywhere.

This also patches a test that has differing output in the parallel case
(hopefully deterministically so!).
These depend on rustc being bug-free and it looks like that's not
currently entirely the case (e.g., we know of at least one bug that
introduces nondeterminism).
…, r=alexcrichton"

This reverts commit 3ed3b8b, reversing
changes made to 99b8953.

We will reland a similar patch at a future date but for now we should get a nightly
released in a few hours with the parallel patch, so this should be
reverted to make sure that the next nightly is not parallel-enabled.
@vivekvpandya
Copy link
Author

I messed this PR while creating a new PR. I will recreate this PR, sorry for inconvenience.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, 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.
2019-12-18T15:44:41.1665747Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-18T15:44:41.1884474Z ##[command]git config gc.auto 0
2019-12-18T15:44:41.1945738Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-18T15:44:41.2017610Z ##[command]git config --get-all http.proxy
2019-12-18T15:44:41.2188707Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/67353/merge:refs/remotes/pull/67353/merge
---
2019-12-18T16:47:34.5713819Z .................................................................................................... 1600/9380
2019-12-18T16:47:39.1529918Z .................................................................................................... 1700/9380
2019-12-18T16:47:51.6304061Z ...................................................................i................................ 1800/9380
2019-12-18T16:47:59.1294105Z .................................................................................................... 1900/9380
2019-12-18T16:48:15.1789708Z ....................................................iiiii........................................... 2000/9380
2019-12-18T16:48:25.9548123Z .................................................................................................... 2200/9380
2019-12-18T16:48:28.5014006Z .................................................................................................... 2300/9380
2019-12-18T16:48:31.9044976Z .................................................................................................... 2400/9380
2019-12-18T16:48:55.1464944Z .................................................................................................... 2500/9380
---
2019-12-18T16:51:39.2703612Z .............................................................i...............i...................... 4800/9380
2019-12-18T16:51:47.1522506Z .................................................................................................... 4900/9380
2019-12-18T16:51:56.0895407Z .................................................................................................... 5000/9380
2019-12-18T16:52:01.3986412Z .....i.............................................................................................. 5100/9380
2019-12-18T16:52:12.3820716Z .......................................................................ii.ii...........i............ 5200/9380
2019-12-18T16:52:21.4458030Z .......i............................................................................................ 5400/9380
2019-12-18T16:52:31.8229305Z .................................................................................................... 5500/9380
2019-12-18T16:52:38.6652540Z .....................................................i.............................................. 5600/9380
2019-12-18T16:52:45.8763237Z .................................................................................................... 5700/9380
2019-12-18T16:52:45.8763237Z .................................................................................................... 5700/9380
2019-12-18T16:52:56.2071874Z .................................................................................................... 5800/9380
2019-12-18T16:53:03.4148826Z .........................................ii...i..ii...........i..................................... 5900/9380
2019-12-18T16:53:26.0940649Z .................................................................................................... 6100/9380
2019-12-18T16:53:34.3403264Z .................................................................................................... 6200/9380
2019-12-18T16:53:34.3403264Z .................................................................................................... 6200/9380
2019-12-18T16:53:45.0039720Z ..................................................................i..ii............................. 6300/9380
2019-12-18T16:54:22.3889285Z .................................................................................................... 6500/9380
2019-12-18T16:54:24.5628653Z ......................................i............................................................. 6600/9380
2019-12-18T16:54:26.8715324Z .................................................................................................... 6700/9380
2019-12-18T16:54:29.4547842Z ..............................i..................................................................... 6800/9380
---
2019-12-18T16:56:11.3510748Z .................................................................................................... 7400/9380
2019-12-18T16:56:16.1816992Z .................................................................................................... 7500/9380
2019-12-18T16:56:21.9645724Z .................................................................................................... 7600/9380
2019-12-18T16:56:31.6845187Z .................................................................................................... 7700/9380
2019-12-18T16:56:40.9404643Z ...................................................iiii............................................. 7800/9380
2019-12-18T16:56:56.1646247Z .................................................................................................... 8000/9380
2019-12-18T16:57:02.7706471Z .................................................................................................... 8100/9380
2019-12-18T16:57:19.1043497Z .................................................................................................... 8200/9380
2019-12-18T16:57:27.2763014Z .................................................................................................... 8300/9380
---
2019-12-18T16:59:28.8178205Z ---- [ui] ui/issues/issue-33992.rs stdout ----
2019-12-18T16:59:28.8178288Z 
2019-12-18T16:59:28.8178656Z error: test compilation failed although it shouldn't!
2019-12-18T16:59:28.8178717Z status: exit code: 101
2019-12-18T16:59:28.8179538Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-33992.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-33992/a" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-33992/auxiliary"
2019-12-18T16:59:28.8180268Z ------------------------------------------
2019-12-18T16:59:28.8180340Z 
2019-12-18T16:59:28.8180597Z ------------------------------------------
2019-12-18T16:59:28.8180649Z stderr:
2019-12-18T16:59:28.8180649Z stderr:
2019-12-18T16:59:28.8181063Z ------------------------------------------
2019-12-18T16:59:28.8181136Z LLVM ERROR: Invalid LLVMRustLinkage value!
2019-12-18T16:59:28.8181466Z ------------------------------------------
2019-12-18T16:59:28.8181519Z 
2019-12-18T16:59:28.8181559Z 
2019-12-18T16:59:28.8181587Z 
---
2019-12-18T16:59:28.8217379Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-12-18T16:59:28.8217723Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-12-18T16:59:28.8228602Z 
2019-12-18T16:59:28.8229075Z 
2019-12-18T16:59:28.8231283Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "7.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-12-18T16:59:28.8235989Z 
2019-12-18T16:59:28.8236047Z 
2019-12-18T16:59:28.8250367Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-12-18T16:59:28.8250474Z Build completed unsuccessfully in 1:08:21
2019-12-18T16:59:28.8250474Z Build completed unsuccessfully in 1:08:21
2019-12-18T16:59:28.8308999Z == clock drift check ==
2019-12-18T16:59:28.8326233Z   local time: Wed Dec 18 16:59:28 UTC 2019
2019-12-18T16:59:28.8953832Z   network time: Wed, 18 Dec 2019 16:59:28 GMT
2019-12-18T16:59:28.8958610Z == end clock drift check ==
2019-12-18T16:59:29.7953093Z 
2019-12-18T16:59:29.8088525Z ##[error]Bash exited with code '1'.
2019-12-18T16:59:29.8128495Z ##[section]Starting: Checkout
2019-12-18T16:59:29.8130633Z ==============================================================================
2019-12-18T16:59:29.8130698Z Task         : Get sources
2019-12-18T16:59:29.8130753Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.