common/autoconf/boot-jdk.m4

Print this page




 333 
 334   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
 335   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
 336   AC_SUBST(BOOT_JDK_SOURCETARGET)
 337   AC_SUBST(JAVAC_FLAGS)
 338 ])
 339 
 340 AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
 341 [
 342   ##############################################################################
 343   #
 344   # Specify jvm options for anything that is run with the Boot JDK.
 345   # Not all JVM:s accept the same arguments on the command line.
 346   #
 347   AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
 348   [specify JVM arguments to be passed to all java invocations of boot JDK, overriding the default values,
 349   e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
 350 
 351   AC_MSG_CHECKING([flags for boot jdk java command] )
 352 

















 353   # Starting amount of heap memory.
 354   ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
 355 
 356   # Maximum amount of heap memory.
 357   # Maximum stack size.
 358   if test "x$BUILD_NUM_BITS" = x32; then
 359     JVM_MAX_HEAP=1100M
 360     STACK_SIZE=768
 361   else
 362     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
 363     # pointers are used. Apparently, we need to increase the heap and stack
 364     # space for the jvm. More specifically, when running javac to build huge
 365     # jdk batch
 366     JVM_MAX_HEAP=1600M
 367     STACK_SIZE=1536
 368   fi
 369   ADD_JVM_ARG_IF_OK([-Xmx$JVM_MAX_HEAP],boot_jdk_jvmargs,[$JAVA])
 370   ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
 371 
 372   # Disable special log output when a debug build is used as Boot JDK...
 373   ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
 374 
 375   # Apply user provided options.
 376   ADD_JVM_ARG_IF_OK([$with_boot_jdk_jvmargs],boot_jdk_jvmargs,[$JAVA])
 377 
 378   AC_MSG_RESULT([$boot_jdk_jvmargs])
 379 
 380   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
 381   JAVA_FLAGS=$boot_jdk_jvmargs
 382 
 383   AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
 384   AC_SUBST(JAVA_FLAGS, $JAVA_FLAGS)







 385 ])


 333 
 334   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
 335   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
 336   AC_SUBST(BOOT_JDK_SOURCETARGET)
 337   AC_SUBST(JAVAC_FLAGS)
 338 ])
 339 
 340 AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
 341 [
 342   ##############################################################################
 343   #
 344   # Specify jvm options for anything that is run with the Boot JDK.
 345   # Not all JVM:s accept the same arguments on the command line.
 346   #
 347   AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
 348   [specify JVM arguments to be passed to all java invocations of boot JDK, overriding the default values,
 349   e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
 350 
 351   AC_MSG_CHECKING([flags for boot jdk java command] )
 352 
 353   # Disable special log output when a debug build is used as Boot JDK...
 354   ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
 355 
 356   # Apply user provided options.
 357   ADD_JVM_ARG_IF_OK([$with_boot_jdk_jvmargs],boot_jdk_jvmargs,[$JAVA])
 358 
 359   AC_MSG_RESULT([$boot_jdk_jvmargs])
 360 
 361   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
 362   JAVA_FLAGS=$boot_jdk_jvmargs
 363 
 364   AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
 365   AC_SUBST(JAVA_FLAGS)
 366 
 367 
 368   AC_MSG_CHECKING([flags for boot jdk java command for big configurations] )
 369 
 370   # Starting amount of heap memory.
 371   ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA])
 372 
 373   # Maximum amount of heap memory.
 374   # Maximum stack size.
 375   if test "x$BUILD_NUM_BITS" = x32; then
 376     JVM_MAX_HEAP=1100M
 377     STACK_SIZE=768
 378   else
 379     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
 380     # pointers are used. Apparently, we need to increase the heap and stack
 381     # space for the jvm. More specifically, when running javac to build huge
 382     # jdk batch
 383     JVM_MAX_HEAP=1600M
 384     STACK_SIZE=1536
 385   fi
 386   ADD_JVM_ARG_IF_OK([-Xmx$JVM_MAX_HEAP],boot_jdk_jvmargs_big,[$JAVA])
 387   ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
 388 
 389   AC_MSG_RESULT([$boot_jdk_jvmargs_big])

 390 
 391   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
 392   AC_SUBST(JAVA_FLAGS_BIG)
 393 

 394 
 395   AC_MSG_CHECKING([flags for boot jdk java command for small configurations] )

 396 
 397   # Use serial gc for small short lived tools if possible
 398   ADD_JVM_ARG_IF_OK([-XX:+UseSerialGC],boot_jdk_jvmargs_small,[$JAVA])
 399   ADD_JVM_ARG_IF_OK([-Xms32M],boot_jdk_jvmargs_small,[$JAVA])
 400   ADD_JVM_ARG_IF_OK([-Xmx512M],boot_jdk_jvmargs_small,[$JAVA])
 401 
 402   AC_MSG_RESULT([$boot_jdk_jvmargs_small])
 403 
 404   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
 405   AC_SUBST(JAVA_FLAGS_SMALL)
 406 ])