452 ifeq ($$($1_TYPE), LIBRARY) |
452 ifeq ($$($1_TYPE), LIBRARY) |
453 $1_TYPE := STATIC_LIBRARY |
453 $1_TYPE := STATIC_LIBRARY |
454 endif |
454 endif |
455 endif |
455 endif |
456 |
456 |
|
457 $$(call SetIfEmpty, $1_COMPILE_WITH_DEBUG_SYMBOLS, $$(COMPILE_WITH_DEBUG_SYMBOLS)) |
|
458 |
|
459 # STATIC_LIBS is set from Main.gmk when building static versions of certain |
|
460 # native libraries. |
|
461 ifeq ($(STATIC_LIBS), true) |
|
462 $1_TYPE := STATIC_LIBRARY |
|
463 # The static versions need to be redirected to different output dirs, both |
|
464 # to not interfere with the main build as well as to not end up inside the |
|
465 # jmods. |
|
466 $1_OBJECT_DIR := $$($1_OBJECT_DIR)/static |
|
467 $1_OUTPUT_DIR := $$($1_OBJECT_DIR) |
|
468 # For release builds where debug symbols are configured to be moved to |
|
469 # separate debuginfo files, disable debug symbols for static libs instead. |
|
470 # We don't currently support this configuration and we don't want symbol |
|
471 # information in release builds unless explicitly asked to provide it. |
|
472 ifeq ($(DEBUG_LEVEL), release) |
|
473 ifeq ($(COPY_DEBUG_SYMBOLS), true) |
|
474 $1_COMPILE_WITH_DEBUG_SYMBOLS := false |
|
475 endif |
|
476 endif |
|
477 endif |
|
478 |
457 ifeq ($$($1_TYPE), EXECUTABLE) |
479 ifeq ($$($1_TYPE), EXECUTABLE) |
458 $1_PREFIX := |
480 $1_PREFIX := |
459 ifeq ($$($1_SUFFIX), ) |
481 ifeq ($$($1_SUFFIX), ) |
460 $1_SUFFIX := $(EXE_SUFFIX) |
482 $1_SUFFIX := $(EXE_SUFFIX) |
461 endif |
483 endif |
589 $1_EXTRA_CFLAGS += $$($1_CFLAGS_release) |
611 $1_EXTRA_CFLAGS += $$($1_CFLAGS_release) |
590 $1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release) |
612 $1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release) |
591 $1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release) |
613 $1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release) |
592 $1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_release) |
614 $1_EXTRA_CFLAGS += $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_release) |
593 endif |
615 endif |
|
616 ifeq ($(STATIC_LIBS), true) |
|
617 $1_EXTRA_CFLAGS += $$(STATIC_LIBS_CFLAGS) |
|
618 endif |
594 |
619 |
595 # Pickup extra OPENJDK_TARGET_OS_TYPE and/or OPENJDK_TARGET_OS dependent variables for CXXFLAGS. |
620 # Pickup extra OPENJDK_TARGET_OS_TYPE and/or OPENJDK_TARGET_OS dependent variables for CXXFLAGS. |
596 $1_EXTRA_CXXFLAGS := $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)) |
621 $1_EXTRA_CXXFLAGS := $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)) |
597 ifneq ($(DEBUG_LEVEL), release) |
622 ifneq ($(DEBUG_LEVEL), release) |
598 # Pickup extra debug dependent variables for CXXFLAGS |
623 # Pickup extra debug dependent variables for CXXFLAGS |
602 else |
627 else |
603 $1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_release) |
628 $1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_release) |
604 $1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release) |
629 $1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release) |
605 $1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release) |
630 $1_EXTRA_CXXFLAGS += $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release) |
606 endif |
631 endif |
|
632 ifeq ($(STATIC_LIBS), true) |
|
633 $1_EXTRA_CXXFLAGS += $$(STATIC_LIB_CFLAGS) |
|
634 endif |
607 |
635 |
608 # If no C++ flags are explicitly set, default to using the C flags. |
636 # If no C++ flags are explicitly set, default to using the C flags. |
609 # After that, we can set additional C++ flags that should not interfere |
637 # After that, we can set additional C++ flags that should not interfere |
610 # with the mechanism for copying the C flags by default. |
638 # with the mechanism for copying the C flags by default. |
611 ifeq ($$($1_CXXFLAGS), ) |
639 ifeq ($$($1_CXXFLAGS), ) |
613 endif |
641 endif |
614 ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)), ) |
642 ifeq ($$(strip $$($1_EXTRA_CXXFLAGS)), ) |
615 $1_EXTRA_CXXFLAGS := $$($1_EXTRA_CFLAGS) |
643 $1_EXTRA_CXXFLAGS := $$($1_EXTRA_CFLAGS) |
616 endif |
644 endif |
617 |
645 |
618 ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true) |
646 ifeq ($$($1_COMPILE_WITH_DEBUG_SYMBOLS), true) |
619 $1_EXTRA_CFLAGS += $$(CFLAGS_DEBUG_SYMBOLS) |
647 $1_EXTRA_CFLAGS += $$(CFLAGS_DEBUG_SYMBOLS) |
620 $1_EXTRA_CXXFLAGS += $$(CFLAGS_DEBUG_SYMBOLS) |
648 $1_EXTRA_CXXFLAGS += $$(CFLAGS_DEBUG_SYMBOLS) |
621 $1_EXTRA_ASFLAGS += $$(ASFLAGS_DEBUG_SYMBOLS) |
649 $1_EXTRA_ASFLAGS += $$(ASFLAGS_DEBUG_SYMBOLS) |
622 endif |
650 endif |
623 |
651 |