< prev index next >

make/modules/java.base/gensrc/GensrcMisc.gmk

Print this page
rev 60628 : 8248498: Add build system support for Windows AArch64
Reviewed-by:
Contributed-by: mbeckwit, luhenry, burban

@@ -58,10 +58,16 @@
   # Need to specify language since the template file has a non standard
   # extension.
   CPP_FLAGS += -x c
 else ifeq ($(TOOLCHAIN_TYPE), microsoft)
   CPP_FLAGS += -nologo
+
+  ifeq ($(OPENJDK_TARGET_CPU),aarch64)
+    # cl.exe does only recognize few file extensions as valid (ex: .c, .h, .cpp), so
+    # make sure *.java.template files are recognized as valid input files
+    CPP_FILEPREFIX = -Tc
+  endif
 endif
 
 # Generate a java source file from a template through the C preprocessor for the
 # target system. First extract the copyright notice at the start of the file.
 # Run the preprocessor. Filter out the default compiler stderr output on

@@ -71,11 +77,11 @@
 # preprocessor.
 define generate-preproc-src
         $(call MakeDir, $(@D))
         $(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_$(@F), \
             ( $(NAWK) '/@@END_COPYRIGHT@@/{exit}1' $< && \
-              $(CPP) $(CPP_FLAGS) $(SYSROOT_CFLAGS) $(CFLAGS_JDKLIB) $< \
+              $(CPP) $(CPP_FLAGS) $(SYSROOT_CFLAGS) $(CFLAGS_JDKLIB) $(CPP_FILEPREFIX) $< \
                   2> >($(GREP) -v '^$(<F)$$' >&2) \
                   | $(NAWK) '/@@START_HERE@@/,0' \
                   |  $(SED) -e 's/@@START_HERE@@/\/\/ AUTOMATICALLY GENERATED FILE - DO NOT EDIT/' \
                   -e 's/PREFIX_//' -e 's/^#.*//' \
             ) > $@ \
< prev index next >