File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux)
2121elseif (CMAKE_SYSTEM_NAME STREQUAL Darwin)
2222 add_definitions (
2323 -DPLATFORM_UNIX
24- -DU_DISABLE_RENAMING=1 #in case we link against to an older binary of icu
24+ -DU_DISABLE_RENAMING=1 #in case we link against to an older binary of icu
2525 )
2626
2727 set (CLR_CMAKE_PLATFORM_UNIX 1)
@@ -84,7 +84,7 @@ if(CLR_CMAKE_PLATFORM_UNIX)
8484 )
8585
8686 # todo: fix general visibility of the interface
87- # do not set to `fvisibility=hidden` as it is going to
87+ # do not set to `fvisibility=hidden` as it is going to
8888 # prevent the required interface is being exported
8989 # clang by default sets fvisibility=default
9090
@@ -139,7 +139,7 @@ endif()
139139 -fno-optimize-sibling-calls\
140140 -mno-omit-leaf-frame-pointer" # this is for compat reasons. i.e. It is a noop with gcc
141141 )
142-
142+
143143 # CXX / CC COMPILER FLAGS
144144 add_compile_options (
145145 -fms-extensions
@@ -177,6 +177,10 @@ if(CLR_CMAKE_PLATFORM_UNIX)
177177 add_definitions (-DFEATURE_PAL )
178178endif (CLR_CMAKE_PLATFORM_UNIX )
179179
180+ if (WITHOUT_FEATURES)
181+ add_definitions (${WITHOUT_FEATURES} )
182+ endif (WITHOUT_FEATURES )
183+
180184enable_language (ASM )
181185
182186include_directories (
Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ PRINT_USAGE() {
3131 echo " -t, --test-build Test build (by default Release build)"
3232 echo " --static Build as static library (by default shared library)"
3333 echo " -v, --verbose Display verbose output including all options"
34+ echo " --without=FEATURE,FEATURE,..."
35+ echo " Disable FEATUREs from JSRT experimental"
36+ echo " features."
3437 echo " "
3538 echo " example:"
3639 echo " ./build.sh --cxx=/path/to/clang++ --cc=/path/to/clang -j"
@@ -49,6 +52,7 @@ MAKE=make
4952MULTICORE_BUILD=" "
5053ICU_PATH=" "
5154STATIC_LIBRARY=" "
55+ WITHOUT_FEATURES=" "
5256
5357while [[ $# -gt 0 ]]; do
5458 case " $1 " in
@@ -116,6 +120,20 @@ while [[ $# -gt 0 ]]; do
116120 STATIC_LIBRARY=" -DSTATIC_LIBRARY=1"
117121 ;;
118122
123+ --without=* )
124+ FEATURES=$1
125+ FEATURES=${FEATURES: 10} # value after --without=
126+ for x in ${FEATURES// ,/ } # replace comma with space then split
127+ do
128+ if [[ " $WITHOUT_FEATURES " == " " ]]; then
129+ WITHOUT_FEATURES=" -DWITHOUT_FEATURES="
130+ else
131+ WITHOUT_FEATURES=" $WITHOUT_FEATURES ;"
132+ fi
133+ WITHOUT_FEATURES=" ${WITHOUT_FEATURES} -DCOMPILE_DISABLE_${x} =1"
134+ done
135+ ;;
136+
119137 * )
120138 echo " Unknown option $1 "
121139 PRINT_USAGE
196214pushd $build_directory > /dev/null
197215
198216echo Generating $BUILD_TYPE makefiles
199- cmake $CMAKE_GEN $CC_PREFIX $ICU_PATH $STATIC_LIBRARY -DCMAKE_BUILD_TYPE=$BUILD_TYPE ../..
217+ cmake $CMAKE_GEN $CC_PREFIX $ICU_PATH $STATIC_LIBRARY -DCMAKE_BUILD_TYPE=$BUILD_TYPE $WITHOUT_FEATURES ../..
200218
201219_RET=$?
202220if [[ $? == 0 ]]; then
You can’t perform that action at this time.
0 commit comments