From 2e51a1553f23d86aa7674ce9f90c9096bdaa9410 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 5 Sep 2019 10:02:41 -0700 Subject: [PATCH] Switch to toybox stat on macOS too. Bug: http://b/139450866 Test: builds Change-Id: I1a992a63fbf5181a48262901730b8b67661cc259 --- core/combo/HOST_darwin-x86_64.mk | 5 ----- core/combo/HOST_linux-x86.mk | 5 ----- core/definitions.mk | 6 +++--- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/core/combo/HOST_darwin-x86_64.mk b/core/combo/HOST_darwin-x86_64.mk index 07f8d9f78a..dac3bbf5cd 100644 --- a/core/combo/HOST_darwin-x86_64.mk +++ b/core/combo/HOST_darwin-x86_64.mk @@ -59,8 +59,3 @@ $(hide) $(PRIVATE_CXX) \ $(PRIVATE_LDFLAGS) \ $(PRIVATE_LDLIBS) endef - -# $(1): The file to check -define get-file-size -stat -f "%z" $(1) -endef diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk index deed943a61..3f4ec0aed1 100644 --- a/core/combo/HOST_linux-x86.mk +++ b/core/combo/HOST_linux-x86.mk @@ -23,8 +23,3 @@ endef ############################################################ ## Macros after this line are shared by the 64-bit config. - -# $(1): The file to check -define get-file-size -stat -c "%s" "$(1)" | tr -d '\n' -endef diff --git a/core/definitions.mk b/core/definitions.mk index a93979ade3..140db60d5d 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -2678,9 +2678,9 @@ endef ########################################################### # $(1): The file to check -ifndef get-file-size -$(error HOST_OS must define get-file-size) -endif +define get-file-size +stat -c "%s" "$(1)" | tr -d '\n' +endef # $(1): The file(s) to check (often $@) # $(2): The partition size.