< prev index next >

make/lib/CompileGtest.gmk

Print this page


   1 #
   2 # Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


  35   GTEST_COPY_DEBUG_SYMBOLS := true
  36 else
  37   GTEST_COPY_DEBUG_SYMBOLS := false
  38 endif
  39 
  40 ################################################################################
  41 
  42 ifeq ($(OPENJDK_TARGET_OS), windows)
  43   GTEST_JVM_MAPFILE := $(JVM_MAPFILE)
  44 else
  45   GTEST_JVM_MAPFILE := $(JVM_OUTPUTDIR)/gtest/mapfile
  46 
  47   $(JVM_OUTPUTDIR)/gtest/symbols: $(JVM_OUTPUTDIR)/symbols
  48         $(call MakeDir, $(@D))
  49         ( $(CAT) $< ; echo "runUnitTests" ) > $@
  50 
  51   $(GTEST_JVM_MAPFILE): $(JVM_OUTPUTDIR)/gtest/symbols
  52         $(call create-mapfile)
  53 endif
  54 
  55 # Disabling switch warning for clang because of test source.

  56 
  57 # Note: On AIX, the gtest test classes linked into the libjvm.so push the TOC
  58 # size beyond 64k, so we need to link with bigtoc. However, this means that
  59 # -qpic=large would be advisable to lessen the performance effect of bigtoc.
  60 # But we want to avoid imposing -qpic=large onto the regular libjvm.so, which
  61 # has no problem with its TOC, so do this only for object files which are
  62 # exclusive to the gtest libjvm.so.
  63 
  64 $(eval $(call SetupNativeCompilation, BUILD_GTEST_LIBJVM, \
  65     TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
  66     LIBRARY := jvm, \
  67     OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
  68     OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/objs, \
  69     SRC := $(GTEST_TEST_SRC), \
  70     EXCLUDES := $(JVM_EXCLUDES), \
  71     EXCLUDE_FILES := gtestLauncher.cpp, \
  72     EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
  73     EXTRA_FILES := $(GTEST_FRAMEWORK_SRC)/src/gtest-all.cc, \
  74     EXTRA_OBJECT_FILES := $(filter-out %/operator_new$(OBJ_SUFFIX), \
  75         $(BUILD_LIBJVM_ALL_OBJS)), \


   1 #
   2 # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


  35   GTEST_COPY_DEBUG_SYMBOLS := true
  36 else
  37   GTEST_COPY_DEBUG_SYMBOLS := false
  38 endif
  39 
  40 ################################################################################
  41 
  42 ifeq ($(OPENJDK_TARGET_OS), windows)
  43   GTEST_JVM_MAPFILE := $(JVM_MAPFILE)
  44 else
  45   GTEST_JVM_MAPFILE := $(JVM_OUTPUTDIR)/gtest/mapfile
  46 
  47   $(JVM_OUTPUTDIR)/gtest/symbols: $(JVM_OUTPUTDIR)/symbols
  48         $(call MakeDir, $(@D))
  49         ( $(CAT) $< ; echo "runUnitTests" ) > $@
  50 
  51   $(GTEST_JVM_MAPFILE): $(JVM_OUTPUTDIR)/gtest/symbols
  52         $(call create-mapfile)
  53 endif
  54 
  55 # Disabling undef, switch, format-nonliteral and tautological-undefined-compare
  56 # warnings for clang because of test source.
  57 
  58 # Note: On AIX, the gtest test classes linked into the libjvm.so push the TOC
  59 # size beyond 64k, so we need to link with bigtoc. However, this means that
  60 # -qpic=large would be advisable to lessen the performance effect of bigtoc.
  61 # But we want to avoid imposing -qpic=large onto the regular libjvm.so, which
  62 # has no problem with its TOC, so do this only for object files which are
  63 # exclusive to the gtest libjvm.so.
  64 
  65 $(eval $(call SetupNativeCompilation, BUILD_GTEST_LIBJVM, \
  66     TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
  67     LIBRARY := jvm, \
  68     OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
  69     OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/objs, \
  70     SRC := $(GTEST_TEST_SRC), \
  71     EXCLUDES := $(JVM_EXCLUDES), \
  72     EXCLUDE_FILES := gtestLauncher.cpp, \
  73     EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
  74     EXTRA_FILES := $(GTEST_FRAMEWORK_SRC)/src/gtest-all.cc, \
  75     EXTRA_OBJECT_FILES := $(filter-out %/operator_new$(OBJ_SUFFIX), \
  76         $(BUILD_LIBJVM_ALL_OBJS)), \


< prev index next >