# # Copyright (c) 2017, Google, Inc. All rights reserved # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, merge, # publish, distribute, sublicense, and/or sell copies of the Software, # and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
# args: # HOST_TEST : name of the test binary (required) # HOST_SRCS : list of source files (required) # HOST_INCLUDE_DIRS : list of include directories # HOST_FLAGS : list of flags for the compiler # HOST_LIBS : list of host-provided libraries to link against # HOST_DEPS : list of libraries to build and link against. Recursive # dependencies are not supported. # HOST_COVERAGE_ENABLED : true/false enable LLVM Source-based code coverage
# Validate arguments. ifeq ($(HOST_TEST), )
$(error HOST_TEST must be specified) endif
ifeq ($(HOST_SRCS), )
$(error HOST_SRCS must be specified) endif
# Select same builddir when included form user-space or kernel ifeq ($(strip $(TRUSTY_TOP_LEVEL_BUILDDIR)),)
HOST_TEST_BUILDDIR := $(BUILDDIR) else
HOST_TEST_BUILDDIR := $(TRUSTY_TOP_LEVEL_BUILDDIR) endif
# We should use the prebuilt linker rather than the host linker
HOST_LDFLAGS := -B$(CLANG_BINDIR) -B$(CLANG_HOST_SEARCHDIR) \
$(foreach dir,$(CLANG_HOST_LDDIRS),-L$(dir)) --sysroot=$(CLANG_HOST_SYSROOT) -fuse-ld=lld
HOST_CC := $(CLANG_BINDIR)/clang
HOST_SANITIZER_FLAGS := -fsanitize=address -fno-omit-frame-pointer
HOST_RUN_ENV := ASAN_OPTIONS=symbolize=1 ASAN_SYMBOLIZER_PATH=$(CLANG_BINDIR)/llvm-symbolizer
HOST_LIBCXX_CPPFLAGS := -stdlib=libc++ -isystem$(CLANG_BINDIR)/../include/c++/v1 # clang-r584948b moved libc++.so into an arch-specific dir
HOST_LIBCXX_DIR := $(patsubst %/,%,$(dir $(firstword $(wildcard \
$(CLANG_HOST_LIBDIR)/libc++.so \
$(CLANG_HOST_LIBDIR)/x86_64-unknown-linux-gnu/libc++.so))))
HOST_LIBCXX_LDFLAGS := -L$(CLANG_HOST_LIBDIR) -stdlib=libc++ -Wl,-rpath,$(HOST_LIBCXX_DIR) # ASAN is not compatible with GDB.
HOST_DEBUGGER :=
# TODO(b/418738869): Disable lint to work around around issue with # PrintTo(char8_t), PrintTo(char16_t) in gtest-printers.h. Tracked # upstream as https://github.com/google/googletest/issues/4762
HOST_FLAGS += -Wno-character-conversion
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.