diff --git a/icu4c/source/data/makedata.mak b/icu4c/source/data/makedata.mak index e8a33ff85dd..95d6baff562 100644 --- a/icu4c/source/data/makedata.mak +++ b/icu4c/source/data/makedata.mak @@ -142,13 +142,20 @@ TESTDATABLD=$(ICUP)\source\test\testdata\out\build ICUTOOLS=$(ICUP)\source\tools !MESSAGE ICU tools path is $(ICUTOOLS) +NATIVE_ARM= +!IF "$(PROCESSOR_ARCHITECTURE)" == "ARM64" || "$(PROCESSOR_ARCHITEW6432)" == "ARM64" +NATIVE_ARM=ARM64 +!ELSE IF "$(PROCESSOR_ARCHITECTURE)" == "ARM" || "$(PROCESSOR_ARCHITEW6432)" == "ARM" +NATIVE_ARM=ARM +!ENDIF + # ARM_CROSS_BUILD # In order to support cross-compiling for ARM/ARM64 using the x64 tools # we need to know if we're building the ARM/ARM64 data DLL, otherwise # the existence of the x64 bits will cause us to think we are already done. # Note: This is only for the "regular" builds, the UWP builds have a separate project file entirely. ARM_CROSS_BUILD= -!IF "$(UWP)" == "" +!IF "$(UWP)" == "" && "$(NATIVE_ARM)" == "" !IF "$(CFG)" == "ARM\Release" || "$(CFG)" == "ARM\Debug" ARM_CROSS_BUILD=ARM ARM_CROSSBUILD_TS=$(ICUTMP)\$(ARM_CROSS_BUILD).timestamp @@ -185,6 +192,18 @@ CFGTOOLS=x64\Debug !IF "$(CFG)" == "x86\Release" || "$(CFG)" == "x86\Debug" PATH = $(ICUP)\bin;$(PATH) ICUPBIN=$(ICUP)\bin +# Use these path whether or not it's UWP build. +!ELSE IF "$(NATIVE_ARM)" != "" +!IF "$(CFG)" == "ARM\Release" || "$(CFG)" == "ARM\Debug" +PATH = $(ICUP)\binARM;$(PATH) +ICUPBIN=$(ICUP)\binARM +!ELSE IF "$(CFG)" == "ARM64\Release" || "$(CFG)" == "ARM64\Debug" +PATH = $(ICUP)\binARM64;$(PATH) +ICUPBIN=$(ICUP)\binARM64 +!ELSE +!ERROR Cross-build from ARM to x86 is not supported! +!ENDIF +# Build x86_64 or cross-build ARM !ELSE PATH = $(ICUP)\bin64;$(PATH) ICUPBIN=$(ICUP)\bin64 diff --git a/icu4c/source/extra/uconv/makedata.mak b/icu4c/source/extra/uconv/makedata.mak index b30f59728b5..81fcc908ee6 100644 --- a/icu4c/source/extra/uconv/makedata.mak +++ b/icu4c/source/extra/uconv/makedata.mak @@ -51,8 +51,16 @@ PKGMODE=static ICD=$(ICUDATA)^\ DATA_PATH=$(ICUP)\data^\ +NATIVE_ARM= +!IF "$(PROCESSOR_ARCHITECTURE)" == "ARM64" || "$(PROCESSOR_ARCHITEW6432)" == "ARM64" +NATIVE_ARM=ARM64 +!ELSE IF "$(PROCESSOR_ARCHITECTURE)" == "ARM" || "$(PROCESSOR_ARCHITEW6432)" == "ARM" +NATIVE_ARM=ARM +!ENDIF + # Use the x64 tools for building ARM and ARM64. # Note: This is similar to the TOOLS CFG PATH in source\data\makedata.mak +!IF "$(NATIVE_ARM)" == "" !IF "$(CFG)" == "x64\Release" || "$(CFG)" == "x64\Debug" || "$(CFG)" == "ARM\Release" || "$(CFG)" == "ARM\Debug" || "$(CFG)" == "ARM64\Release" || "$(CFG)" == "ARM64\Debug" ICUTOOLS=$(ICUP)\bin64 PATH = $(ICUP)\bin64;$(PATH) @@ -60,6 +68,15 @@ PATH = $(ICUP)\bin64;$(PATH) ICUTOOLS=$(ICUP)\bin PATH = $(ICUP)\bin;$(PATH) !ENDIF +!ELSE +!IF "$(CFG)" == "ARM\Release" || "$(CFG)" == "ARM\Debug" +ICUTOOLS=$(ICUP)\binARM +PATH = $(ICUP)\binARM;$(PATH) +!ELSE +ICUTOOLS=$(ICUP)\binARM64 +PATH = $(ICUP)\binARM64;$(PATH) +!ENDIF +!ENDIF # If building ARM/ARM, then we need to pass the arch as an argument. EXTRA_PKGDATA_ARGUMENTS=