Now that we should be `objtool`-warning free, enable `objtool` for Rust too. Before this patch series, we were already getting warnings under e.g. IBT builds, since those would see Rust code via `vmlinux.o`.
Showing the changes to scripts (1 of 2 files). Show all
Unified · Split
| @@ -288,10 +288,15 @@ rust_common_cmd = \ · 287 unmodified lines | ||
| 288 | 288 | # would not match each other. |
| 289 | 289 | |
| 290 | 290 | quiet_cmd_rustc_o_rs = $(RUSTC_OR_CLIPPY_QUIET) $(quiet_modtag) $@ |
| 291 | − cmd_rustc_o_rs = $(rust_common_cmd) --emit=obj=$@ $< | |
| 291 | + cmd_rustc_o_rs = $(rust_common_cmd) --emit=obj=$@ $< $(cmd_objtool) | |
| 292 | + | |
| 293 | +define rule_rustc_o_rs | |
| 294 | + $(call cmd_and_fixdep,rustc_o_rs) | |
| 295 | + $(call cmd,gen_objtooldep) | |
| 296 | +endef | |
| 292 | 297 | |
| 293 | 298 | $(obj)/%.o: $(obj)/%.rs FORCE |
| 294 | − +$(call if_changed_dep,rustc_o_rs) | |
| 299 | + +$(call if_changed_rule,rustc_o_rs) | |
| 295 | 300 | |
| 296 | 301 | quiet_cmd_rustc_rsi_rs = $(RUSTC_OR_CLIPPY_QUIET) $(quiet_modtag) $@ |
| 297 | 302 | cmd_rustc_rsi_rs = \ |