Repository navigation
Add linker_script option to rust_binary - #208
Conversation
|
Also because I just thought of it does anyone else think we should maybe break |
In which case is there's a need for compile time data that is not passed as a different attribute? Do you mean a linker script can use data? If so and there is no other case, maybe either add a linker_scripts_data or make linker_script a label_list and have a convention about which one is the script. |
I was referring to data in general not in the context of linker scripts. I understand that compile time dependencies are good for |
damienmg
left a comment
There was a problem hiding this comment.
LGTM. Let's wait for either Marco or Alex to review too.
As for the "compile-time" data, we have the out_dir_tar input which is a bit like that. I have a change to change it so it also accept a directory artifact (in order to have a better integration with crate build script)
|
On the compile_data tangent, yes I think that would be a useful distinction. Bundling it into out_dir_tar makes sense, but I don't recall that being easy/intuitive to use. |
This explicitly adds a
linker_scriptoption torust_binaryas suggested in the bottom of #204.It's fundamentally identical to adding the ldscript to data and then adding
--codegen=link-args=-T$(location //:ldscript)torustc_flags, but now without the hassle of figuring that out yourself.