diff options
author | Jordan Bayles <jophba@chromium.org> | 2019-07-23 12:12:17 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-07-23 21:01:41 +0000 |
commit | 824067c598022f08bcbd23ea9342497ae6360a67 (patch) | |
tree | ae51c91abbd0eb3b8f7f165015e36a30c570ad97 /tools | |
parent | 04362e2b8bed52bf34bca214c63e4abd07c2c0ba (diff) | |
download | openscreen-824067c598022f08bcbd23ea9342497ae6360a67.tar.gz |
Fixup Chromium build
Due to some recent changes, especially the new trace logging code, the
Chromium build of Open Screen is broken. This patch fixes this.
Change-Id: I4add685687707ef8e13403dbe54bf6f3ff9aef05
Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1715248
Reviewed-by: Max Yakimakha <yakimakha@chromium.org>
Commit-Queue: Jordan Bayles <jophba@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/cddl/BUILD.gn | 6 | ||||
-rw-r--r-- | tools/cddl/stubs.cc | 23 |
2 files changed, 29 insertions, 0 deletions
diff --git a/tools/cddl/BUILD.gn b/tools/cddl/BUILD.gn index f2c5d702..403cab3b 100644 --- a/tools/cddl/BUILD.gn +++ b/tools/cddl/BUILD.gn @@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build_overrides/build.gni") + executable("cddl") { sources = [ "codegen.cc", @@ -15,6 +17,10 @@ executable("cddl") { "sema.h", ] + if (build_with_chromium) { + sources += [ "stubs.cc" ] + } + deps = [ # CDDL always uses the default logger, even when embedded. "../../platform", diff --git a/tools/cddl/stubs.cc b/tools/cddl/stubs.cc new file mode 100644 index 00000000..17585483 --- /dev/null +++ b/tools/cddl/stubs.cc @@ -0,0 +1,23 @@ +// Copyright 2019 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// CDDL needs linked implementations of these methods when Open Screen is +// embedded, but can't link the embedder's implementation without explicit +// knowledge of it, due to the CDDL executable being linked and ran before +// the embedder's methods are compiled and linked. + +#include "platform/api/time.h" +#include "platform/api/trace_logging_platform.h" + +namespace openscreen { +namespace platform { +bool IsTraceLoggingEnabled(TraceCategory::Value category) { + return false; +} + +Clock::time_point Clock::now() noexcept { + return {}; +} +} // namespace platform +} // namespace openscreen
\ No newline at end of file |