Description
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:
// Provide additional link information
#[link(prerelease)];
// Bulid for the Osbourne 1
#[cfg(platform = "osbourne")];
// Disable warnings about global warming
#[nowarn(number = "588")];
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.