Commit eefd5d31 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

cppgc: Add public target to build against

- Fixes includes to be relative to include/ which allows embedders
  to just add V8's include directory to get started.
- Adds public target for the library as "cppgc".

Bug: chromium:1056170
Change-Id: Iec9b644e20016a5d7281275b739821a050fd2540
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2157366Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67278}
parent e1eac1b1
......@@ -301,6 +301,7 @@ config("internal_config_base") {
include_dirs = [
".",
"include",
"$target_gen_dir",
]
}
......@@ -4116,12 +4117,6 @@ v8_static_library("wee8") {
]
}
v8_static_library("cppgc") {
deps = [ ":cppgc_base" ]
configs = [ ":internal_config" ]
}
###############################################################################
# Executables
#
......@@ -4414,6 +4409,14 @@ if (is_component_build) {
public_configs = [ ":external_config" ]
}
v8_component("cppgc") {
public_deps = [ ":cppgc_base" ]
configs = [ ":internal_config" ]
public_configs = [ ":external_config" ]
}
v8_component("cppgc_for_testing") {
testonly = true
......@@ -4446,6 +4449,12 @@ if (is_component_build) {
public_configs = [ ":external_config" ]
}
group("cppgc") {
public_deps = [ ":cppgc_base" ]
public_configs = [ ":external_config" ]
}
group("cppgc_for_testing") {
testonly = true
......
include_rules = [
"-include",
"+v8config.h",
"+v8-platform.h",
"+cppgc",
"-src",
]
......@@ -8,10 +8,10 @@
#include <stdint.h>
#include <atomic>
#include "include/cppgc/garbage-collected.h"
#include "include/cppgc/heap.h"
#include "include/cppgc/internal/api-constants.h"
#include "include/cppgc/internal/gc-info.h"
#include "cppgc/garbage-collected.h"
#include "cppgc/heap.h"
#include "cppgc/internal/api-constants.h"
#include "cppgc/internal/gc-info.h"
namespace cppgc {
......
......@@ -7,11 +7,11 @@
#include <type_traits>
#include "include/cppgc/internal/api-constants.h"
#include "include/cppgc/macros.h"
#include "include/cppgc/platform.h"
#include "include/cppgc/trace-trait.h"
#include "include/cppgc/type-traits.h"
#include "cppgc/internal/api-constants.h"
#include "cppgc/macros.h"
#include "cppgc/platform.h"
#include "cppgc/trace-trait.h"
#include "cppgc/type-traits.h"
namespace cppgc {
......
......@@ -7,7 +7,7 @@
#include <memory>
#include "include/v8config.h"
#include "v8config.h" // NOLINT(build/include)
namespace cppgc {
namespace internal {
......
......@@ -5,7 +5,7 @@
#ifndef INCLUDE_CPPGC_INTERNAL_ACCESSORS_H_
#define INCLUDE_CPPGC_INTERNAL_ACCESSORS_H_
#include "include/cppgc/internal/api-constants.h"
#include "cppgc/internal/api-constants.h"
namespace cppgc {
......
......@@ -8,7 +8,7 @@
#include <stddef.h>
#include <stdint.h>
#include "include/v8config.h"
#include "v8config.h" // NOLINT(build/include)
namespace cppgc {
namespace internal {
......
......@@ -7,7 +7,7 @@
#include <type_traits>
#include "include/cppgc/type-traits.h"
#include "cppgc/type-traits.h"
namespace cppgc {
namespace internal {
......
......@@ -7,8 +7,8 @@
#include <stdint.h>
#include "include/cppgc/internal/finalizer-trait.h"
#include "include/v8config.h"
#include "cppgc/internal/finalizer-trait.h"
#include "v8config.h" // NOLINT(build/include)
namespace cppgc {
namespace internal {
......
......@@ -5,8 +5,8 @@
#ifndef INCLUDE_CPPGC_INTERNAL_LOGGING_H_
#define INCLUDE_CPPGC_INTERNAL_LOGGING_H_
#include "include/cppgc/source-location.h"
#include "include/v8config.h"
#include "cppgc/source-location.h"
#include "v8config.h" // NOLINT(build/include)
namespace cppgc {
namespace internal {
......
......@@ -9,9 +9,9 @@
#include <memory>
#include <vector>
#include "include/cppgc/internal/logging.h"
#include "include/cppgc/trace-trait.h"
#include "include/v8config.h"
#include "cppgc/internal/logging.h"
#include "cppgc/trace-trait.h"
#include "v8config.h" // NOLINT(build/include)
namespace cppgc {
......
......@@ -8,8 +8,8 @@
#include <cstdint>
#include <type_traits>
#include "include/cppgc/source-location.h"
#include "include/v8config.h"
#include "cppgc/source-location.h"
#include "v8config.h" // NOLINT(build/include)
namespace cppgc {
namespace internal {
......
......@@ -5,8 +5,8 @@
#ifndef INCLUDE_CPPGC_INTERNAL_PREFINALIZER_HANDLER_H_
#define INCLUDE_CPPGC_INTERNAL_PREFINALIZER_HANDLER_H_
#include "include/cppgc/heap.h"
#include "include/cppgc/liveness-broker.h"
#include "cppgc/heap.h"
#include "cppgc/liveness-broker.h"
namespace cppgc {
namespace internal {
......
......@@ -5,10 +5,10 @@
#ifndef INCLUDE_CPPGC_LIVENESS_BROKER_H_
#define INCLUDE_CPPGC_LIVENESS_BROKER_H_
#include "include/cppgc/heap.h"
#include "include/cppgc/member.h"
#include "include/cppgc/trace-trait.h"
#include "include/v8config.h"
#include "cppgc/heap.h"
#include "cppgc/member.h"
#include "cppgc/trace-trait.h"
#include "v8config.h" // NOLINT(build/include)
namespace cppgc {
......
......@@ -9,9 +9,9 @@
#include <cstddef>
#include <type_traits>
#include "include/cppgc/internal/pointer-policies.h"
#include "include/cppgc/type-traits.h"
#include "include/v8config.h"
#include "cppgc/internal/pointer-policies.h"
#include "cppgc/type-traits.h"
#include "v8config.h" // NOLINT(build/include)
namespace cppgc {
......
......@@ -7,12 +7,12 @@
#include <type_traits>
#include "include/cppgc/internal/persistent-node.h"
#include "include/cppgc/internal/pointer-policies.h"
#include "include/cppgc/source-location.h"
#include "include/cppgc/type-traits.h"
#include "include/cppgc/visitor.h"
#include "include/v8config.h"
#include "cppgc/internal/persistent-node.h"
#include "cppgc/internal/pointer-policies.h"
#include "cppgc/source-location.h"
#include "cppgc/type-traits.h"
#include "cppgc/visitor.h"
#include "v8config.h" // NOLINT(build/include)
namespace cppgc {
namespace internal {
......
......@@ -5,8 +5,8 @@
#ifndef INCLUDE_CPPGC_PLATFORM_H_
#define INCLUDE_CPPGC_PLATFORM_H_
#include "include/v8-platform.h"
#include "include/v8config.h"
#include "v8-platform.h" // NOLINT(build/include)
#include "v8config.h" // NOLINT(build/include)
namespace cppgc {
......
......@@ -5,11 +5,11 @@
#ifndef INCLUDE_CPPGC_PREFINALIZER_H_
#define INCLUDE_CPPGC_PREFINALIZER_H_
#include "include/cppgc/internal/accessors.h"
#include "include/cppgc/internal/compiler-specific.h"
#include "include/cppgc/internal/prefinalizer-handler.h"
#include "include/cppgc/liveness-broker.h"
#include "include/cppgc/macros.h"
#include "cppgc/internal/accessors.h"
#include "cppgc/internal/compiler-specific.h"
#include "cppgc/internal/prefinalizer-handler.h"
#include "cppgc/liveness-broker.h"
#include "cppgc/macros.h"
namespace cppgc {
......
......@@ -7,7 +7,7 @@
#include <string>
#include "include/v8config.h"
#include "v8config.h" // NOLINT(build/include)
#if defined(__has_builtin)
#define CPPGC_SUPPORTS_SOURCE_LOCATION \
......
......@@ -6,7 +6,7 @@
#define V8_HEAP_CPPGC_TRACE_TRAIT_H_
#include <type_traits>
#include "include/cppgc/type-traits.h"
#include "cppgc/type-traits.h"
namespace cppgc {
......
......@@ -5,13 +5,13 @@
#ifndef INCLUDE_CPPGC_VISITOR_H_
#define INCLUDE_CPPGC_VISITOR_H_
#include "include/cppgc/garbage-collected.h"
#include "include/cppgc/internal/logging.h"
#include "include/cppgc/internal/pointer-policies.h"
#include "include/cppgc/liveness-broker.h"
#include "include/cppgc/member.h"
#include "include/cppgc/source-location.h"
#include "include/cppgc/trace-trait.h"
#include "cppgc/garbage-collected.h"
#include "cppgc/internal/logging.h"
#include "cppgc/internal/pointer-policies.h"
#include "cppgc/liveness-broker.h"
#include "cppgc/member.h"
#include "cppgc/source-location.h"
#include "cppgc/trace-trait.h"
namespace cppgc {
namespace internal {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment