-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Create a mechanism to merge config files into the crate compilation environment #612
Comments
Instead of an #include syntax extension we could have an include attribute that's interpreted by the crate evaluator, like #[include(file = "rustc.attrs")]; |
I hit the situation the other day where I couldn't get rustc to find my native library without modifying the source code, and it was super annoying, so I may do this for 0.3 |
Nominating feature complete. We never followed up on this idea and in the meantime rustc has grown a lot of command line options and crate attributes. |
This would be quite useful. Also isn't backwards compatible. |
accepted for feature-complete milestone |
Not 1.0 |
Is this still valid? I'd imagine this is basically "Cargo," right? |
@steveklabnik: Yeah, this is exactly what Cargo is for. |
Add unix seteuid() Adds prototype for unix seteuid() as defined [here](http://pubs.opengroup.org/onlinepubs/009695399/functions/seteuid.html).
Document that literals with any suffixes are valid as tokens
We no longer plan to use these hooks so I am deleting them.
We need some mechanism to provide configuration information to the compiler via a file that, e.g. is produced by the build system. The intent is - at least partially - to remove the need for the long, arcane command lines that plague C compilers.
I would like to, at minimum, be able to merge arbitrary attributes into the list of the crate's attributes. This would provide enough flexibility to provide various types of unforeseen hints to the compiler. So you could have a rustc.attrs file that looks like:
How this is actually merged into the compilation environment I do not know. Graydon has suggested a --cfg-file= command line option (maybe --attr-file?). We could also have an #include extension that goes in the .rc file, in which case the included file might contain arbitrary content, though that would behave significantly different from current extensions. We could also just have a convention: if theres a [crate].attrs file in some location it gets merged in.
Needs discussion.
The text was updated successfully, but these errors were encountered: