Skip to content

Commit 6f1b140

Browse files
moetayukomicky387
authored andcommitted
Fix false positive when checking ELF prebuilts in PRODUCT_COPY_FILES
llvm-readobj is valid for other object file types such as PE/COFF, so some firmware files are wrongly detected as ELF prebuilts. Additionally check the output of llvm-readobj to avoid such false positives. Change-Id: I4c4ede747967b4a1213aadaed2f925672d18579c
1 parent 1fa6cb9 commit 6f1b140

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/definitions.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3206,7 +3206,7 @@ $(check_non_elf_file_timestamp): $(1) $(LLVM_READOBJ)
32063206
$(hide) mkdir -p "$$(dir $$@)"
32073207
$(hide) rm -f "$$@"
32083208
$(hide) \
3209-
if $(LLVM_READOBJ) -h "$$<" >/dev/null 2>&1; then \
3209+
if $(LLVM_READOBJ) -h "$$<" 2>/dev/null | grep -q "^Format: elf"; then \
32103210
$(call echo-error,$(2),$(3)); \
32113211
$(call echo-error,$(2),found ELF file: $$<); \
32123212
false; \

0 commit comments

Comments
 (0)