Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upBetter support for `--llvm-root`. #27937
Conversation
rust-highfive
assigned
brson
Aug 22, 2015
This comment has been minimized.
This comment has been minimized.
|
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
alexcrichton
reviewed
Aug 24, 2015
| $$(S) | ||
| $$(S) \ | ||
| "$$(LLVM_LIBDIR_RUSTFLAGS_$(3))" \ | ||
| "$$(shell $$(LLVM_CONFIG_$(3)) --components)" |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
alexcrichton
reviewed
Aug 24, 2015
| @@ -2327,6 +2328,37 @@ pub unsafe fn debug_loc_to_string(c: ContextRef, tr: DebugLocRef) -> String { | |||
| .expect("got a non-UTF8 DebugLoc from LLVM") | |||
| } | |||
|
|
|||
| pub fn initialize_available_targets() { | |||
| macro_rules! init_target( | |||
| ($cfg:ident $fn_name:ident) => { { | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
alexcrichton
reviewed
Aug 24, 2015
| @@ -83,7 +83,7 @@ endif | |||
| LLVM_LINKAGE_PATH_$(1):=$$(abspath $$(RT_OUTPUT_DIR_$(1))/llvmdeps.rs) | |||
| $$(LLVM_LINKAGE_PATH_$(1)): $(S)src/etc/mklldeps.py $$(LLVM_CONFIG_$(1)) | |||
| $(Q)$(CFG_PYTHON) "$$<" "$$@" "$$(LLVM_COMPONENTS)" "$$(CFG_ENABLE_LLVM_STATIC_STDCPP)" \ | |||
| $$(LLVM_CONFIG_$(1)) | |||
| "$$(CFG_ENABLE_LLVM_LIBCPP)" $$(LLVM_CONFIG_$(1)) | |||
This comment has been minimized.
This comment has been minimized.
alexcrichton
Aug 24, 2015
Member
In the configure script it looks like this is CFG_ENABLE_LIBCPP instead of LLVM_LIBCPP, was this defined elsewhere though?
This comment has been minimized.
This comment has been minimized.
DiamondLovesYou
Aug 24, 2015
Author
Contributor
Actually it's worse than that: configure doesn't even putvar anything related to libcpp. Nice catch, thanks.
This comment has been minimized.
This comment has been minimized.
|
The travis failures here look like they may not be benign |
DiamondLovesYou
force-pushed the
DiamondLovesYou:llvm-root-and-shared
branch
3 times, most recently
from
8bfc6cd
to
320cc47
Aug 25, 2015
This comment has been minimized.
This comment has been minimized.
|
Can this hold off on the changes to tests/maketest for now? The changes to compiletest are only needed if tests are linking to the compiler (e.g. fulldeps), but for most targets with custom LLVM builds we probably don't need the compiler itself working there just yet, so fixes like this can come later if absolutely necessary. Same with the changes to run-make as I believe run-make isn't run for target-only targets (as opposed to host+target targets). I continue to be very wary of landing all these changes as it's quite a deal of difficult logic that isn't tested in any way, so I prefer to minimize the impact as much as possible. |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton They were due to variable expansions happening before |
DiamondLovesYou
added a commit
to DiamondLovesYou/rust
that referenced
this pull request
Aug 26, 2015
DiamondLovesYou
referenced this pull request
Aug 26, 2015
Closed
Make the fulldeps modes independent of their respective non-fulldeps mode. #28017
DiamondLovesYou
force-pushed the
DiamondLovesYou:llvm-root-and-shared
branch
from
320cc47
to
8a345c5
Aug 26, 2015
This comment has been minimized.
This comment has been minimized.
|
Looks like good cleanup. I agree that the additional complexity in compiletest is unwarranted for now. Maybe we can fix this problem some other way and I'm happy to ignore all fulldeps tests on the web for a while. |
This comment has been minimized.
This comment has been minimized.
|
@brson I'm not sure I understand what you mean by "I'm happy to ignore all fulldeps tests on the web for a while". Could you explain exactly what you mean? Also, surely the benefit of the fulldep tests outweighs the pretty minimal additional complexity in |
This comment has been minimized.
This comment has been minimized.
|
Currently running the fulldeps tests means that the entire compiler has to be built for the target platform, and in this case that probably isn't necessary. I believe @brson means that in the interest of keeping this minimal (e.g. only running the Unfortunately "minimal complexity" ends up being bitrotted very quickly without being exercised which ends up porting it forward for a few years or so only to be painfully deleted at some point. |
alexcrichton
referenced this pull request
Sep 10, 2015
Closed
Don't force system LLVM libs to be linked staticly #28327
This comment has been minimized.
This comment has been minimized.
|
Following up on some discussion on #28327: The current patch does not work for my use case, and I don't think the LLVM patch mentioned in the #28327 discussion is going to help, because I don't have a |
This comment has been minimized.
This comment has been minimized.
|
Is your system's LLVM built with CMake && BUILD_SHARED_LIBS I'll have to add an extra flag to On Thu, Sep 10, 2015 at 12:14 PM, wthrowe notifications@github.com wrote:
|
This comment has been minimized.
This comment has been minimized.
|
Yes, it looks like it uses CMake with |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
Just fyi: we in Gentoo are interested in the possibility to link Rust to separated LLVM shared libraries, otherwise we can't use the system wide LLVM which is quite sad from the point of view of the overall build time. |
jauhien
added a commit
to jauhien/gentoo-rust
that referenced
this pull request
Sep 23, 2015
This comment has been minimized.
This comment has been minimized.
DiamondLovesYou
force-pushed the
DiamondLovesYou:llvm-root-and-shared
branch
3 times, most recently
from
95e6097
to
f8e9e86
Nov 11, 2015
This comment has been minimized.
This comment has been minimized.
|
Ready to go. |
alexcrichton
reviewed
Nov 30, 2015
| $$(LLVM_CONFIG_$(1)) "$(CFG_STDCPP_NAME)" | ||
| $(Q)$(CFG_PYTHON) "$$<" "$$@" "$(filter $(shell \ | ||
| $(CFG_LLVM_ROOT)/bin/llvm-config$(X_$(CFG_BUILD)) \ | ||
| --components), \ |
This comment has been minimized.
This comment has been minimized.
alexcrichton
Nov 30, 2015
Member
Can this be replaced with a variable defined below to avoid re-invoking llvm-config?
This comment has been minimized.
This comment has been minimized.
DiamondLovesYou
Dec 3, 2015
Author
Contributor
No, because we don't want to link unused LLVM components into rustc.
This comment has been minimized.
This comment has been minimized.
DiamondLovesYou
Dec 3, 2015
Author
Contributor
I mean, I don't have a problem with just linking everything, I just thought you guys might not like it.
This comment has been minimized.
This comment has been minimized.
|
I have a feeling that this is likely to break over time (as there's no CI and this looks pretty brittle as so many build system things are), but it seems fine as it should be easy to get back up to speed in the future. |
This comment has been minimized.
This comment has been minimized.
|
|
DiamondLovesYou
force-pushed the
DiamondLovesYou:llvm-root-and-shared
branch
from
7026709
to
049042e
Dec 3, 2015
This comment has been minimized.
This comment has been minimized.
|
Ok, the point about re-invoking |
DiamondLovesYou
force-pushed the
DiamondLovesYou:llvm-root-and-shared
branch
from
049042e
to
abc6e7a
Dec 12, 2015
This comment has been minimized.
This comment has been minimized.
|
Done! |
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Dec 13, 2015
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Dec 13, 2015
This comment has been minimized.
This comment has been minimized.
|
|
DiamondLovesYou
force-pushed the
DiamondLovesYou:llvm-root-and-shared
branch
from
abc6e7a
to
7bd69f2
Dec 13, 2015
This comment has been minimized.
This comment has been minimized.
|
Whoops, I forgot to push a change to |
DiamondLovesYou commentedAug 22, 2015
This handles cases when the LLVM used isn't configured will the 'usual' targets. Also, cases where LLVM is shared are also handled (ie with
LD_LIBRARY_PATHetc).