8257679: Improved unix compatibility layer in Windows build (winenv)

Reviewed-by: erikj, jvernee, burban
This commit is contained in:
Magnus Ihse Bursie 2020-12-07 15:55:53 +00:00
parent 74be819088
commit d29c78da19
48 changed files with 1718 additions and 2302 deletions

View file

@ -44,8 +44,11 @@ ifeq ($(call isTargetOs, aix), true)
endif
################################################################################
# Copy the microsoft runtime libraries on windows
ifeq ($(call isTargetOs, windows), true)
# Copy the microsoft runtime libraries on windows, but only if we are not
# creating a buildjdk. If we are, the provided runtime librareis are made for
# the target platform, not the build platform (and we should not need to bundle
# anything with the minimalistic, locally-only buildjdk.)
ifeq ($(call isTargetOs, windows)+$(CREATING_BUILDJDK), true+false)
# Chmod to avoid permission issues if bundles are unpacked on unix platforms.
define copy-and-chmod

View file

@ -32,13 +32,18 @@ GENSRC_CHARACTERDATA :=
CHARACTERDATA = $(TOPDIR)/make/data/characterdata
UNICODEDATA = $(TOPDIR)/make/data/unicodedata
ifneq ($(DEBUG_LEVEL), release)
ifeq ($(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT), true)
DEBUG_OPTION := -d
endif
endif
define SetupCharacterData
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java: \
$(CHARACTERDATA)/$1.java.template
$$(call LogInfo, Generating $1.java)
$$(call MakeDir, $$(@D))
$(TOOL_GENERATECHARACTER) $2 \
$(if $(call equals, $(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT), true), -d) \
$(TOOL_GENERATECHARACTER) $2 $(DEBUG_OPTION) \
-template $(CHARACTERDATA)/$1.java.template \
-spec $(UNICODEDATA)/UnicodeData.txt \
-specialcasing $(UNICODEDATA)/SpecialCasing.txt \

View file

@ -36,7 +36,8 @@ GENSRC_CHARSETCODER_TEMPLATE := $(GENSRC_CHARSETCODER_SRC)/charset/Charset-X-Cod
$(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
$(call MakeTargetDir)
$(RM) $@.tmp
$(TOOL_SPP) -i$< -o$@.tmp \
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_charset_decoder, \
$(TOOL_SPP) -i$< -o$@.tmp \
-Kdecoder \
-DA='A' \
-Da='a' \
@ -61,7 +62,7 @@ $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
-DItypesPerOtype='CharsPerByte' \
-DnotLegal='not legal for this charset' \
-Dotypes-per-itype='chars-per-byte' \
-DoutSequence='Unicode character'
-DoutSequence='Unicode character')
$(MV) $@.tmp $@
GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java
@ -71,7 +72,8 @@ GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java
$(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
$(call MakeTargetDir)
$(RM) $@.tmp
$(TOOL_SPP) -i$< -o$@.tmp \
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_charset_encoder, \
$(TOOL_SPP) -i$< -o$@.tmp \
-Kencoder \
-DA='An' \
-Da='an' \
@ -96,7 +98,7 @@ $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
-DItypesPerOtype='BytesPerChar' \
-DnotLegal='not a legal sixteen-bit Unicode sequence' \
-Dotypes-per-itype='bytes-per-char' \
-DoutSequence='byte sequence in the given charset'
-DoutSequence='byte sequence in the given charset')
$(MV) $@.tmp $@
GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java