Skip to content

Commit

Permalink
[Merge chakra-core/ChakraCore@96387111d7] [MERGE #3135 @obastemur] xp…
Browse files Browse the repository at this point in the history
…lat: Improve ICU fallback conditions

Merge pull request #3135 from obastemur:dont_fall

node-chakracore was silently falling back to `no-icu`. Couple of changes to be more proactive when a custom ICU path is given. Similarly, do not fallback to `no-icu` when custom ICU path is given.
  • Loading branch information
chakrabot committed Jun 14, 2017
1 parent 76c7a22 commit d41d2ee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 3 additions & 1 deletion deps/chakrashim/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ elseif(CC_TARGET_OS_OSX)
-DPLATFORM_UNIX
)

if(NOT ICULIB)
# in case ICU path was given but it doesn't exist, build script will fail.
# so, fallback only if ICU path wasn't given
if(NOT ICU_INCLUDE_PATH)
set(NO_ICU_PATH_GIVEN 1)
message("-- Couldn't find ICU. Falling back to --no-icu build")
endif()
Expand Down
12 changes: 11 additions & 1 deletion deps/chakrashim/core/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,17 @@ while [[ $# -gt 0 ]]; do

--icu=*)
ICU_PATH=$1
ICU_PATH="-DICU_INCLUDE_PATH_SH=${ICU_PATH:6}"
ICU_PATH="${ICU_PATH:6}"
if [[ ! -d ${ICU_PATH} ]]; then
if [[ -d "${CHAKRACORE_DIR}/${ICU_PATH}" ]]; then
ICU_PATH="${CHAKRACORE_DIR}/${ICU_PATH}"
else
# if ICU_PATH is given, do not fallback to no-icu
echo "!!! couldn't find ICU at $ICU_PATH"
exit 1
fi
fi
ICU_PATH="-DICU_INCLUDE_PATH_SH=${ICU_PATH}"
;;

--libs-only)
Expand Down

0 comments on commit d41d2ee

Please sign in to comment.