aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorbtolsch <btolsch@chromium.org>2019-03-29 16:48:49 -0700
committerCommit Bot <commit-bot@chromium.org>2019-03-29 23:54:46 +0000
commit2f2e7fa4e9e4fc1e0a95ee632171d49c30d51dba (patch)
treefc1e91e268efffe6ba903b1b3584a77031f86a04 /tools
parent8774ef2c7eaa31e1fec2ee7faef529e7e1cc7b01 (diff)
downloadopenscreen-2f2e7fa4e9e4fc1e0a95ee632171d49c30d51dba.tar.gz
Add initial chromium compile support
This change updates various BUILD.gn files to work in both standalone builds and Chromium builds. There are several main changes that have to take place: 1. Change abseil include paths so we can use any abseil location. 2. Change logging macros to use Chromium's //base/logging.h. 3. Separate out files with the GN variable build_with_chromium. 4. Add a new config to each target to maintain our include structure and change over the logging macros. Change-Id: I066698cd07b2315842c700b5adf01bdc656db9be Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1534469 Commit-Queue: Brandon Tolsch <btolsch@chromium.org> Reviewed-by: Peter Thatcher <pthatcher@google.com> Reviewed-by: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/cddl/BUILD.gn5
-rw-r--r--tools/cddl/codegen.cc2
-rw-r--r--tools/cddl/parse.cc4
-rw-r--r--tools/cddl/parse.h2
-rw-r--r--tools/cddl/sema.cc6
-rw-r--r--tools/cddl/sema.h2
6 files changed, 11 insertions, 10 deletions
diff --git a/tools/cddl/BUILD.gn b/tools/cddl/BUILD.gn
index 32772ef3..01fe2546 100644
--- a/tools/cddl/BUILD.gn
+++ b/tools/cddl/BUILD.gn
@@ -14,7 +14,8 @@ executable("cddl") {
]
deps = [
- "//platform",
- "//third_party/abseil",
+ "../../platform",
+ "../../third_party/abseil",
]
+ configs += [ "../..:root_config_overrides" ]
}
diff --git a/tools/cddl/codegen.cc b/tools/cddl/codegen.cc
index 2ed3bc52..80d788d7 100644
--- a/tools/cddl/codegen.cc
+++ b/tools/cddl/codegen.cc
@@ -11,7 +11,7 @@
#include <utility>
#include <vector>
-#include "third_party/abseil/src/absl/types/optional.h"
+#include "absl/types/optional.h"
// Convert '-' to '_' to use a CDDL identifier as a C identifier.
std::string ToUnderscoreId(const std::string& x) {
diff --git a/tools/cddl/parse.cc b/tools/cddl/parse.cc
index 74c40c7d..f7ba3ded 100644
--- a/tools/cddl/parse.cc
+++ b/tools/cddl/parse.cc
@@ -12,9 +12,9 @@
#include <sstream>
#include <vector>
+#include "absl/strings/ascii.h"
+#include "absl/strings/match.h"
#include "platform/api/logging.h"
-#include "third_party/abseil/src/absl/strings/ascii.h"
-#include "third_party/abseil/src/absl/strings/match.h"
static_assert(sizeof(absl::string_view::size_type) == sizeof(size_t),
"We assume string_view's size_type is the same as size_t. If "
diff --git a/tools/cddl/parse.h b/tools/cddl/parse.h
index 92f6b7ce..d029c851 100644
--- a/tools/cddl/parse.h
+++ b/tools/cddl/parse.h
@@ -11,7 +11,7 @@
#include <string>
#include <vector>
-#include "third_party/abseil/src/absl/strings/string_view.h"
+#include "absl/strings/string_view.h"
struct AstNode {
// These types all correspond to types in the grammar, which can be found in
diff --git a/tools/cddl/sema.cc b/tools/cddl/sema.cc
index 1b938482..61632c1f 100644
--- a/tools/cddl/sema.cc
+++ b/tools/cddl/sema.cc
@@ -14,9 +14,9 @@
#include <string>
#include <vector>
-#include "third_party/abseil/src/absl/strings/numbers.h"
-#include "third_party/abseil/src/absl/strings/string_view.h"
-#include "third_party/abseil/src/absl/types/optional.h"
+#include "absl/strings/numbers.h"
+#include "absl/strings/string_view.h"
+#include "absl/types/optional.h"
CddlType::CddlType()
: map(nullptr), op(CddlType::Op::kNone), constraint_type(nullptr) {}
diff --git a/tools/cddl/sema.h b/tools/cddl/sema.h
index 38399f62..ee5b52da 100644
--- a/tools/cddl/sema.h
+++ b/tools/cddl/sema.h
@@ -12,7 +12,7 @@
#include <utility>
#include <vector>
-#include "third_party/abseil/src/absl/types/optional.h"
+#include "absl/types/optional.h"
#include "tools/cddl/parse.h"
struct CddlGroup;