diff options
| author | Rob Clark <robin.clark@oss.qualcomm.com> | 2026-07-18 08:06:55 -0700 |
|---|---|---|
| committer | Rob Clark <robin.clark@oss.qualcomm.com> | 2026-07-18 08:06:55 -0700 |
| commit | b2128290c29902315e632ea59e0504d6bc9e9b42 (patch) | |
| tree | 821e1d3ee506d4c1f33be605ff3c2e1c1dc6703f /scripts/Makefile.thinlto | |
| parent | e2332abed2a4d3caa59052095dc16e4ce44791ea (diff) | |
| parent | a1c81cb05273077219fa809424330fdaa4346d5b (diff) | |
| download | linux-stable-b2128290c29902315e632ea59e0504d6bc9e9b42.tar.gz linux-stable-b2128290c29902315e632ea59e0504d6bc9e9b42.zip | |
Merge remote-tracking branch 'drm/drm-next' into msm-next-backmerge
Backmerge of drm-next, mainly to pick up dt bindings docs updates to
avoid conflicts.
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
| -rw-r--r-- | scripts/Makefile.thinlto | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/scripts/Makefile.thinlto b/scripts/Makefile.thinlto new file mode 100644 index 000000000000..bb83f13f3cd6 --- /dev/null +++ b/scripts/Makefile.thinlto @@ -0,0 +1,40 @@ +PHONY := __default +__default: + +include include/config/auto.conf +include $(srctree)/scripts/Kbuild.include +include $(srctree)/scripts/Makefile.lib + +native-objs := $(patsubst %.o,%.thinlto-native.o,$(call read-file, vmlinux.thinlto-index)) + +__default: $(native-objs) + +# Generate .thinlto-native.o (obj) from .o (bitcode) and .thinlto.bc (summary) files +# --------------------------------------------------------------------------- +quiet_cmd_cc_o_bc = CC $(quiet_modtag) $@ + be_flags = $(shell sed -n '/saved_c_flags_/s/.*:= //p' \ + $(dir $(<)).$(notdir $(<)).cmd) + cmd_cc_o_bc = \ + $(CC) $(be_flags) -x ir -fno-lto -Wno-unused-command-line-argument \ + -fthinlto-index=$(word 2, $^) -c -o $@ $< + +targets += $(native-objs) +$(native-objs): %.thinlto-native.o: %.o %.o.thinlto.bc FORCE + $(call if_changed,cc_o_bc) + +# Add FORCE to the prerequisites of a target to force it to be always rebuilt. +# --------------------------------------------------------------------------- + +PHONY += FORCE +FORCE: + +# Read all saved command lines and dependencies for the $(targets) we +# may be building above, using $(if_changed{,_dep}). As an +# optimization, we don't need to read them if the target does not +# exist, we will rebuild anyway in that case. + +existing-targets := $(wildcard $(sort $(targets))) + +-include $(foreach f, $(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) + +.PHONY: $(PHONY) |
