-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rust should support a no extra attribute and flag. #7927
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
Comments
I think that this should all work today anyway. Rust knows nothing about an "extra" library, so there's no need to add extra flags for it. It only so happens that the supplement of On the other hand, you could always modify |
Basically the steps to achieve what you want sound like they can be accomplished with:
Now those steps may be a bit complicated, so in my opinion the issue should be more about simplifying them possibly? |
Yes, the problem is the existing workaround is too complex. My idea about the flags is just one specific suggestion. I think I should clarify the issue. The main problem is that the process of developing, and managing alternate versions of existing libraries is too complicated. I know the Haskell cabal package manager has a similar problem, and that people have various hacks so that they can switch between, and use separate Haskell build environments. Perhaps we can steal a good solution from there? Also, this might be more a rustpkg problem than a rustc problem. Perhaps when rustpkg is more mature the process of automatically pulling in the extra directory could be pulled up a level of abstraction to rustpkg instead of rustc? |
This is a build system problem. As @alexcrichton said, rust knows nothing about A possible solution would be making paths given on the command line take priority, so if multiple matching crates are found, it picks the highest priority one. It would still bail out if there are multiple "highest" libs though. |
(@Aatch to be pedantic, it actually does, |
Okay, here's my idea of how this could be solved by moving getting the extra library up a level to rustpkg. By default when RUST_PATH is unset, the location of the extra library is included in RUST_PATH. But one could set RUST_PATH to a different value, and point to a different extra library. Under this scheme rustc itself would know nothing about the extra library. |
Closing in favour of #8784 which is as far as I know the unofficial official plan. |
Rust should support a no extra attribute and flag. This would be useful for me so I could:
rustc rust/src/libextra/extra.rs --output-dir .
rustc -L . -Z no-extra rust/src/test/bench/msgsend-mutex-arcs.rs -o mutex-bench
./mutex-bench
This would greatly speed up time hunting for the regression in mutex performance for my pull request #7701 .
The text was updated successfully, but these errors were encountered: