]> granicus.if.org Git - icu/commitdiff
ICU-21800 Fix ARM64 search path for Windows
authorJacky_Yin <jjyyg1123@gmail.com>
Wed, 20 Oct 2021 03:23:16 +0000 (11:23 +0800)
committerJeff Genovy <29107334+jefgen@users.noreply.github.com>
Wed, 27 Oct 2021 18:00:08 +0000 (11:00 -0700)
icu4c/source/data/makedata.mak
icu4c/source/extra/uconv/makedata.mak

index e8a33ff85ddef1ea869f8a01ad414010c2fc2461..95d6baff562e03556d8c576ce48460f6a723ff95 100644 (file)
@@ -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
index b30f59728b57fd35faa2e77b92f965bd2a76b3e7..81fcc908ee679b6e7e9ae7045adb8eb103f3df93 100644 (file)
@@ -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=