chore: import upstream snapshot with attribution
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
diff --git absl/container/internal/btree.h absl/container/internal/btree.h
|
||||
--- absl/container/internal/btree.h
|
||||
+++ absl/container/internal/btree.h
|
||||
@@ -223,7 +223,7 @@ struct key_compare_adapter {
|
||||
|
||||
public:
|
||||
using Base::Base;
|
||||
- checked_compare(Compare comp) : Base(std::move(comp)) {} // NOLINT
|
||||
+ checked_compare(Compare _comp) : Base(std::move(_comp)) {} // NOLINT
|
||||
|
||||
// Allow converting to Compare for use in key_comp()/value_comp().
|
||||
explicit operator Compare() const { return comp(); }
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
diff --git BUILD.boost BUILD.boost
|
||||
--- a/BUILD.boost
|
||||
+++ b/BUILD.boost
|
||||
@@ -457,7 +457,7 @@ cc_library(
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":asio",
|
||||
- "@openssl//:ssl",
|
||||
+ "@boringssl//:ssl",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -2736,3 +2736,38 @@ boost_library(
|
||||
":variant2",
|
||||
],
|
||||
)
|
||||
+
|
||||
+filegroup(
|
||||
+ name = "boost_ray_hdrs",
|
||||
+ srcs = glob([
|
||||
+ "boost/%s/**/*" % lib
|
||||
+ for lib in [
|
||||
+ "archive",
|
||||
+ "assert",
|
||||
+ "bind",
|
||||
+ "callable_traits",
|
||||
+ "concept",
|
||||
+ "config",
|
||||
+ "container",
|
||||
+ "container_hash",
|
||||
+ "core",
|
||||
+ "detail",
|
||||
+ "dll",
|
||||
+ "exception",
|
||||
+ "filesystem",
|
||||
+ "functional",
|
||||
+ "io",
|
||||
+ "iterator",
|
||||
+ "lexical_cast",
|
||||
+ "move",
|
||||
+ "mpl",
|
||||
+ "optional",
|
||||
+ "parameter",
|
||||
+ "preprocessor",
|
||||
+ "system",
|
||||
+ "type_traits",
|
||||
+ "utility",
|
||||
+ ]
|
||||
+ ] + ["boost/*.hpp"]),
|
||||
+ visibility = ["//visibility:public"],
|
||||
+)
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/lib/xcode_support.bzl
|
||||
+++ b/lib/xcode_support.bzl
|
||||
@@ -33,7 +33,6 @@
|
||||
current_version = xcode_config.xcode_version()
|
||||
if not current_version:
|
||||
- fail("Could not determine Xcode version at all. This likely means Xcode isn't available; " +
|
||||
- "if you think this is a mistake, please file an issue.")
|
||||
+ return False
|
||||
|
||||
desired_version = apple_common.dotted_version(version)
|
||||
return current_version >= desired_version
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
diff --git cython.py cython.py
|
||||
index 9283c4d..cae9864 100755
|
||||
--- cython.py
|
||||
+++ cython.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
#
|
||||
# Cython -- Main Program, generic
|
||||
@@ -0,0 +1,31 @@
|
||||
diff --git src/core/lib/gpr/linux/cpu.cc b/src/core/lib/gpr/linux/cpu.cc
|
||||
index 670ca6551c..043021dc4a 100644
|
||||
--- src/core/lib/gpr/linux/cpu.cc
|
||||
+++ src/core/lib/gpr/linux/cpu.cc
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#ifdef GPR_CPU_LINUX
|
||||
|
||||
+#include <charconv>
|
||||
#include <errno.h>
|
||||
#include <sched.h>
|
||||
#include <string.h>
|
||||
@@ -49,7 +50,17 @@ static void init_num_cpus() {
|
||||
#endif
|
||||
// This must be signed. sysconf returns -1 when the number cannot be
|
||||
// determined
|
||||
- ncpus = static_cast<int>(sysconf(_SC_NPROCESSORS_CONF));
|
||||
+ static constexpr const char* grpc_pooling_env_var_name = "RAY_num_grpc_internal_threads";
|
||||
+ const char* env_var_value = std::getenv(grpc_pooling_env_var_name);
|
||||
+ if (env_var_value != nullptr) {
|
||||
+ const char* end = env_var_value + std::strlen(env_var_value);
|
||||
+ auto const out = std::from_chars(env_var_value, end, ncpus);
|
||||
+ if(out.ec != std::errc()) {
|
||||
+ ncpus = static_cast<int>(sysconf(_SC_NPROCESSORS_CONF));
|
||||
+ }
|
||||
+ } else {
|
||||
+ ncpus = static_cast<int>(sysconf(_SC_NPROCESSORS_CONF));
|
||||
+ }
|
||||
if (ncpus < 1) {
|
||||
gpr_log(GPR_ERROR, "Cannot determine number of CPUs: assuming 1");
|
||||
ncpus = 1;
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
diff --git bazel/cython_library.bzl bazel/cython_library.bzl
|
||||
--- bazel/cython_library.bzl
|
||||
+++ bazel/cython_library.bzl
|
||||
@@ -10,15 +10,16 @@
|
||||
-def pyx_library(name, deps = [], py_deps = [], srcs = [], **kwargs):
|
||||
+def pyx_library(name, deps = [], cc_kwargs = {}, py_deps = [], srcs = [], **kwargs):
|
||||
"""Compiles a group of .pyx / .pxd / .py files.
|
||||
|
||||
First runs Cython to create .cpp files for each input .pyx or .py + .pxd
|
||||
- pair. Then builds a shared object for each, passing "deps" to each cc_binary
|
||||
- rule (includes Python headers by default). Finally, creates a py_library rule
|
||||
- with the shared objects and any pure Python "srcs", with py_deps as its
|
||||
- dependencies; the shared objects can be imported like normal Python files.
|
||||
+ pair. Then builds a shared object for each, passing "deps" and `**cc_kwargs`
|
||||
+ to each cc_binary rule (includes Python headers by default). Finally, creates
|
||||
+ a py_library rule with the shared objects and any pure Python "srcs", with py_deps
|
||||
+ as its dependencies; the shared objects can be imported like normal Python files.
|
||||
|
||||
Args:
|
||||
name: Name for the rule.
|
||||
deps: C/C++ dependencies of the Cython (e.g. Numpy headers).
|
||||
+ cc_kwargs: cc_binary extra arguments such as copts, linkstatic, linkopts, features
|
||||
@@ -57,7 +59,9 @@ def pyx_library(name, deps = [], py_deps = [], srcs = [], **kwargs):
|
||||
- shared_object_name = stem + ".so"
|
||||
+ shared_object_name = stem + ".so"
|
||||
native.cc_binary(
|
||||
- name = shared_object_name,
|
||||
+ name = cc_kwargs.pop("name", shared_object_name),
|
||||
- srcs = [stem + ".cpp"],
|
||||
+ srcs = [stem + ".cpp"] + cc_kwargs.pop("srcs", []),
|
||||
- deps = deps + ["@local_config_python//:python_headers"],
|
||||
+ deps = deps + ["@local_config_python//:python_headers"] + cc_kwargs.pop("deps", []),
|
||||
- defines = defines,
|
||||
+ defines = defines,
|
||||
+ features = cc_kwargs.pop("features", []),
|
||||
- linkshared = 1,
|
||||
+ linkshared = cc_kwargs.pop("linkshared", 1),
|
||||
+ **cc_kwargs
|
||||
)
|
||||
--
|
||||
@@ -0,0 +1,69 @@
|
||||
diff -u BUILD
|
||||
--- BUILD
|
||||
+++ BUILD
|
||||
@@ -30,7 +30,3 @@
|
||||
package(
|
||||
- default_visibility = ["//visibility:public"],
|
||||
- features = [
|
||||
- "layering_check",
|
||||
- "-parse_headers",
|
||||
- ],
|
||||
+ default_visibility = ["//visibility:public"],
|
||||
)
|
||||
diff -u src/core/BUILD
|
||||
--- src/core/BUILD
|
||||
+++ src/core/BUILD
|
||||
@@ -25,6 +25,3 @@
|
||||
package(
|
||||
default_visibility = ["//:__subpackages__"],
|
||||
- features = [
|
||||
- "layering_check",
|
||||
- ],
|
||||
)
|
||||
diff -u src/cpp/ext/gsm/BUILD
|
||||
--- src/cpp/ext/gsm/BUILD
|
||||
+++ src/cpp/ext/gsm/BUILD
|
||||
@@ -24,8 +24,5 @@
|
||||
package(
|
||||
default_visibility = ["//visibility:public"],
|
||||
- features = [
|
||||
- "layering_check",
|
||||
- ],
|
||||
)
|
||||
|
||||
grpc_cc_library(
|
||||
diff -u src/cpp/ext/gcp/BUILD
|
||||
--- src/cpp/ext/gcp/BUILD
|
||||
+++ src/cpp/ext/gcp/BUILD
|
||||
@@ -24,8 +24,5 @@
|
||||
package(
|
||||
default_visibility = ["//visibility:public"],
|
||||
- features = [
|
||||
- "layering_check",
|
||||
- ],
|
||||
)
|
||||
|
||||
grpc_cc_library(
|
||||
diff -u src/cpp/ext/otel/BUILD
|
||||
--- src/cpp/ext/otel/BUILD
|
||||
+++ src/cpp/ext/otel/BUILD
|
||||
@@ -24,8 +24,5 @@
|
||||
package(
|
||||
default_visibility = ["//visibility:public"],
|
||||
- features = [
|
||||
- "layering_check",
|
||||
- ],
|
||||
)
|
||||
|
||||
grpc_cc_library(
|
||||
diff -u test/core/transport/binder/end2end/fuzzers/BUILD
|
||||
--- test/core/transport/binder/end2end/fuzzers/BUILD
|
||||
+++ test/core/transport/binder/end2end/fuzzers/BUILD
|
||||
@@ -17,7 +17,4 @@
|
||||
|
||||
grpc_package(
|
||||
name = "test/core/transport/binder/end2end/fuzzers",
|
||||
- features = [
|
||||
- "layering_check",
|
||||
- ],
|
||||
)
|
||||
@@ -0,0 +1,15 @@
|
||||
diff --git src/core/lib/promise/pipe.h b/src/core/lib/promise/pipe.h
|
||||
--- src/core/lib/promise/pipe.h
|
||||
+++ src/core/lib/promise/pipe.h
|
||||
@@ -63,9 +63,9 @@
|
||||
template <typename T>
|
||||
class NextResult final {
|
||||
public:
|
||||
- NextResult() : center_(nullptr) {}
|
||||
+ NextResult() : center_(nullptr), cancelled_(true) {}
|
||||
explicit NextResult(RefCountedPtr<pipe_detail::Center<T>> center)
|
||||
- : center_(std::move(center)) {
|
||||
+ : center_(std::move(center)), cancelled_(false) {
|
||||
GPR_ASSERT(center_ != nullptr);
|
||||
}
|
||||
explicit NextResult(bool cancelled)
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
diff -u bazel/grpc_deps.bzl
|
||||
--- bazel/grpc_deps.bzl
|
||||
+++ bazel/grpc_deps.bzl
|
||||
@@ -238,6 +238,9 @@
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/madler/zlib/archive/04f42ceca40f73e2978b50e93806c2a18c1281fc.tar.gz",
|
||||
"https://github.com/madler/zlib/archive/04f42ceca40f73e2978b50e93806c2a18c1281fc.tar.gz",
|
||||
],
|
||||
+ patches = [
|
||||
+ "@io_ray//thirdparty/patches:zlib-fdopen.patch",
|
||||
+ ]
|
||||
)
|
||||
|
||||
if "com_google_protobuf" not in native.existing_rules():
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
diff --git sds.h sds.h
|
||||
--- sds.h
|
||||
+++ sds.h
|
||||
@@ -43,1 +43,6 @@
|
||||
|
||||
+#if defined(_MSC_VER) && !defined(__clang__)
|
||||
+#pragma pack(push, 1)
|
||||
+#pragma push_macro("__attribute__")
|
||||
+#define __attribute__(A)
|
||||
+#endif
|
||||
@@ -74,1 +78,5 @@
|
||||
+#if defined(_MSC_VER) && !defined(__clang__)
|
||||
+#pragma pop_macro("__attribute__")
|
||||
+#pragma pack(pop)
|
||||
+#endif
|
||||
|
||||
diff --git fmacros.h fmacros.h
|
||||
--- fmacros.h
|
||||
+++ fmacros.h
|
||||
@@ -13,0 +13,3 @@
|
||||
+#if defined(_MSC_VER) && !defined(__clang__) && !defined(strdup)
|
||||
+#define strdup _strdup
|
||||
+#endif
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
diff --git include/msgpack/v1/adaptor/fixint.hpp include/msgpack/v1/adaptor/fixint.hpp
|
||||
--- include/msgpack/v1/adaptor/fixint.hpp
|
||||
+++ include/msgpack/v1/adaptor/fixint.hpp
|
||||
@@ -24,7 +24,7 @@ template <typename T>
|
||||
struct fix_int {
|
||||
typedef T value_type;
|
||||
fix_int() : value(0) { }
|
||||
- fix_int(T value) : value(value) { }
|
||||
+ fix_int(T _value) : value(_value) { }
|
||||
|
||||
operator T() const { return value; }
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
diff --git include/msgpack/v1/vrefbuffer.hpp include/msgpack/v1/vrefbuffer.hpp
|
||||
--- include/msgpack/v1/vrefbuffer.hpp
|
||||
+++ include/msgpack/v1/vrefbuffer.hpp
|
||||
@@ -25,7 +25,22 @@
|
||||
-#if defined(unix) || defined(__unix) || defined(__APPLE__) || defined(__OpenBSD__)
|
||||
+#if defined(unix) || defined(__unix) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__unix__)
|
||||
#include <sys/uio.h>
|
||||
#else
|
||||
+#ifdef _WIN32
|
||||
+#ifndef _WS2DEF_
|
||||
+#include <Winsock2.h>
|
||||
+#endif
|
||||
+#ifndef iovec
|
||||
+#define iovec _WSABUF
|
||||
+#endif
|
||||
+#ifndef iov_base
|
||||
+#define iov_base buf
|
||||
+#endif
|
||||
+#ifndef iov_len
|
||||
+#define iov_len len
|
||||
+#endif
|
||||
+#else
|
||||
struct iovec {
|
||||
void *iov_base;
|
||||
size_t iov_len;
|
||||
};
|
||||
+#endif
|
||||
@@ -171,1 +179,1 @@
|
||||
- const_cast<const void *>((m_tail - 1)->iov_base)
|
||||
+ (m_tail - 1)->iov_base
|
||||
--
|
||||
@@ -0,0 +1,36 @@
|
||||
diff --git a/opencensus/stats/internal/delta_producer.cc b/opencensus/stats/internal/delta_producer.cc
|
||||
index c61b4d9..1d00504 100644
|
||||
--- a/opencensus/stats/internal/delta_producer.cc
|
||||
+++ b/opencensus/stats/internal/delta_producer.cc
|
||||
@@ -139,5 +139,9 @@ void DeltaProducer::RunHarvesterLoop() {
|
||||
}
|
||||
}
|
||||
|
||||
+void DeltaProducer::SetHarvestInterval(const absl::Duration interval) {
|
||||
+ harvest_interval_ = interval;
|
||||
+}
|
||||
+
|
||||
} // namespace stats
|
||||
} // namespace opencensus
|
||||
diff --git a/opencensus/stats/internal/delta_producer.h b/opencensus/stats/internal/delta_producer.h
|
||||
index bec5605..e565f6a 100644
|
||||
--- a/opencensus/stats/internal/delta_producer.h
|
||||
+++ b/opencensus/stats/internal/delta_producer.h
|
||||
@@ -84,6 +84,8 @@ class DeltaProducer final {
|
||||
// Flushes the active delta and blocks until it is harvested.
|
||||
void Flush() ABSL_LOCKS_EXCLUDED(delta_mu_, harvester_mu_);
|
||||
|
||||
+ void SetHarvestInterval(const absl::Duration interval);
|
||||
+
|
||||
private:
|
||||
DeltaProducer();
|
||||
|
||||
@@ -100,7 +102,7 @@ class DeltaProducer final {
|
||||
// every harvest_interval_.
|
||||
void RunHarvesterLoop();
|
||||
|
||||
- const absl::Duration harvest_interval_ = absl::Seconds(5);
|
||||
+ absl::Duration harvest_interval_ = absl::Seconds(5);
|
||||
|
||||
// Guards the active delta and its configuration. Anything that changes the
|
||||
// delta configuration (e.g. adding a measure or BucketBoundaries) must
|
||||
@@ -0,0 +1,200 @@
|
||||
diff --git a/opencensus/exporters/stats/prometheus/internal/prometheus_exporter.cc b/opencensus/exporters/stats/prometheus/internal/prometheus_exporter.cc
|
||||
index 3bb5962..706b9b4 100644
|
||||
--- a/opencensus/exporters/stats/prometheus/internal/prometheus_exporter.cc
|
||||
+++ b/opencensus/exporters/stats/prometheus/internal/prometheus_exporter.cc
|
||||
@@ -25,7 +25,7 @@ namespace opencensus {
|
||||
namespace exporters {
|
||||
namespace stats {
|
||||
|
||||
-std::vector<prometheus::MetricFamily> PrometheusExporter::Collect() const {
|
||||
+std::vector<prometheus::MetricFamily> PrometheusExporter::Collect() {
|
||||
const auto data = opencensus::stats::StatsExporter::GetViewData();
|
||||
std::vector<prometheus::MetricFamily> output(data.size());
|
||||
for (int i = 0; i < data.size(); ++i) {
|
||||
diff --git a/opencensus/exporters/stats/prometheus/prometheus_exporter.h b/opencensus/exporters/stats/prometheus/prometheus_exporter.h
|
||||
index bbb285d..ab6471f 100644
|
||||
--- a/opencensus/exporters/stats/prometheus/prometheus_exporter.h
|
||||
+++ b/opencensus/exporters/stats/prometheus/prometheus_exporter.h
|
||||
@@ -41,7 +41,7 @@ namespace stats {
|
||||
// PrometheusExporter is thread-safe.
|
||||
class PrometheusExporter final : public ::prometheus::Collectable {
|
||||
public:
|
||||
- std::vector<prometheus::MetricFamily> Collect() const override;
|
||||
+ std::vector<prometheus::MetricFamily> Collect() override;
|
||||
};
|
||||
|
||||
} // namespace stats
|
||||
diff --git a/opencensus/stats/internal/delta_producer.cc b/opencensus/stats/internal/delta_producer.cc
|
||||
index 1d00504..7eb0d8a 100644
|
||||
--- a/opencensus/stats/internal/delta_producer.cc
|
||||
+++ b/opencensus/stats/internal/delta_producer.cc
|
||||
@@ -75,6 +75,20 @@ DeltaProducer* DeltaProducer::Get() {
|
||||
return global_delta_producer;
|
||||
}
|
||||
|
||||
+void DeltaProducer::Shutdown() {
|
||||
+ {
|
||||
+ absl::MutexLock l(&mu_);
|
||||
+ if (!thread_started_) {
|
||||
+ return;
|
||||
+ }
|
||||
+ thread_started_ = false;
|
||||
+ }
|
||||
+ // Join loop thread when shutdown.
|
||||
+ if (harvester_thread_.joinable()) {
|
||||
+ harvester_thread_.join();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void DeltaProducer::AddMeasure() {
|
||||
delta_mu_.Lock();
|
||||
absl::MutexLock harvester_lock(&harvester_mu_);
|
||||
@@ -115,7 +129,10 @@ void DeltaProducer::Flush() {
|
||||
}
|
||||
|
||||
DeltaProducer::DeltaProducer()
|
||||
- : harvester_thread_(&DeltaProducer::RunHarvesterLoop, this) {}
|
||||
+ : harvester_thread_(&DeltaProducer::RunHarvesterLoop, this) {
|
||||
+ absl::MutexLock l(&mu_);
|
||||
+ thread_started_ = true;
|
||||
+}
|
||||
|
||||
void DeltaProducer::SwapDeltas() {
|
||||
ABSL_ASSERT(last_delta_.delta().empty() && "Last delta was not consumed.");
|
||||
@@ -131,11 +148,19 @@ void DeltaProducer::RunHarvesterLoop() {
|
||||
absl::Time next_harvest_time = absl::Now() + harvest_interval_;
|
||||
while (true) {
|
||||
const absl::Time now = absl::Now();
|
||||
- absl::SleepFor(next_harvest_time - now);
|
||||
+ absl::SleepFor(absl::Seconds(0.1));
|
||||
// Account for the possibility that the last harvest took longer than
|
||||
// harvest_interval_ and we are already past next_harvest_time.
|
||||
- next_harvest_time = std::max(next_harvest_time, now) + harvest_interval_;
|
||||
- Flush();
|
||||
+ if (absl::Now() > next_harvest_time) {
|
||||
+ next_harvest_time = std::max(next_harvest_time, now) + harvest_interval_;
|
||||
+ Flush();
|
||||
+ }
|
||||
+ {
|
||||
+ absl::MutexLock l(&mu_);
|
||||
+ if (!thread_started_) {
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/opencensus/stats/internal/delta_producer.h b/opencensus/stats/internal/delta_producer.h
|
||||
index e565f6a..453b4ef 100644
|
||||
--- a/opencensus/stats/internal/delta_producer.h
|
||||
+++ b/opencensus/stats/internal/delta_producer.h
|
||||
@@ -71,6 +71,8 @@ class DeltaProducer final {
|
||||
// Returns a pointer to the singleton DeltaProducer.
|
||||
static DeltaProducer* Get();
|
||||
|
||||
+ void Shutdown();
|
||||
+
|
||||
// Adds a new Measure.
|
||||
void AddMeasure();
|
||||
|
||||
@@ -124,6 +126,9 @@ class DeltaProducer final {
|
||||
// thread when calling a flush during harvesting.
|
||||
Delta last_delta_ ABSL_GUARDED_BY(harvester_mu_);
|
||||
std::thread harvester_thread_ ABSL_GUARDED_BY(harvester_mu_);
|
||||
+
|
||||
+ mutable absl::Mutex mu_;
|
||||
+ bool thread_started_ ABSL_GUARDED_BY(mu_) = false;
|
||||
};
|
||||
|
||||
} // namespace stats
|
||||
diff --git a/opencensus/stats/internal/stats_exporter.cc b/opencensus/stats/internal/stats_exporter.cc
|
||||
index 7de96d6..f9cac57 100644
|
||||
--- a/opencensus/stats/internal/stats_exporter.cc
|
||||
+++ b/opencensus/stats/internal/stats_exporter.cc
|
||||
@@ -95,25 +95,57 @@ void StatsExporterImpl::ClearHandlersForTesting() {
|
||||
}
|
||||
|
||||
void StatsExporterImpl::StartExportThread() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_) {
|
||||
- t_ = std::thread(&StatsExporterImpl::RunWorkerLoop, this);
|
||||
thread_started_ = true;
|
||||
+ t_ = std::thread(&StatsExporterImpl::RunWorkerLoop, this);
|
||||
+}
|
||||
+
|
||||
+void StatsExporterImpl::Shutdown() {
|
||||
+ {
|
||||
+ absl::MutexLock l(&mu_);
|
||||
+ if (!thread_started_) {
|
||||
+ return;
|
||||
+ }
|
||||
+ thread_started_ = false;
|
||||
+ }
|
||||
+ // Join loop thread when shutdown.
|
||||
+ if (t_.joinable()) {
|
||||
+ t_.join();
|
||||
+ }
|
||||
}
|
||||
|
||||
void StatsExporterImpl::RunWorkerLoop() {
|
||||
absl::Time next_export_time = GetNextExportTime();
|
||||
while (true) {
|
||||
// SleepFor() returns immediately when given a negative duration.
|
||||
- absl::SleepFor(next_export_time - absl::Now());
|
||||
+ absl::SleepFor(absl::Seconds(0.1));
|
||||
// In case the last export took longer than the export interval, we
|
||||
// calculate the next time from now.
|
||||
- next_export_time = GetNextExportTime();
|
||||
- Export();
|
||||
+ if (absl::Now() > next_export_time) {
|
||||
+ next_export_time = GetNextExportTime();
|
||||
+ Export();
|
||||
+ }
|
||||
+ {
|
||||
+ absl::MutexLock l(&mu_);
|
||||
+ if (!thread_started_) {
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
// StatsExporter
|
||||
// -------------
|
||||
|
||||
+void StatsExporter::Shutdown() {
|
||||
+ StatsExporterImpl::Get()->Shutdown();
|
||||
+ StatsExporterImpl::Get()->ClearHandlersForTesting();
|
||||
+}
|
||||
+
|
||||
+void StatsExporter::ExportNow() {
|
||||
+ DeltaProducer::Get()->Flush();
|
||||
+ StatsExporterImpl::Get()->Export();
|
||||
+}
|
||||
+
|
||||
// static
|
||||
void StatsExporter::SetInterval(absl::Duration interval) {
|
||||
StatsExporterImpl::Get()->SetInterval(interval);
|
||||
diff --git a/opencensus/stats/internal/stats_exporter_impl.h b/opencensus/stats/internal/stats_exporter_impl.h
|
||||
index abbd13e..823471e 100644
|
||||
--- a/opencensus/stats/internal/stats_exporter_impl.h
|
||||
+++ b/opencensus/stats/internal/stats_exporter_impl.h
|
||||
@@ -34,6 +34,7 @@ class StatsExporterImpl {
|
||||
public:
|
||||
static StatsExporterImpl* Get();
|
||||
void SetInterval(absl::Duration interval);
|
||||
+ void Shutdown();
|
||||
absl::Time GetNextExportTime() const;
|
||||
void AddView(const ViewDescriptor& view);
|
||||
void RemoveView(absl::string_view name);
|
||||
diff --git a/opencensus/stats/stats_exporter.h b/opencensus/stats/stats_exporter.h
|
||||
index 6756858..228069b 100644
|
||||
--- a/opencensus/stats/stats_exporter.h
|
||||
+++ b/opencensus/stats/stats_exporter.h
|
||||
@@ -44,6 +44,8 @@ class StatsExporter final {
|
||||
|
||||
// Removes the view with 'name' from the registry, if one is registered.
|
||||
static void RemoveView(absl::string_view name);
|
||||
+ static void Shutdown();
|
||||
+ static void ExportNow();
|
||||
|
||||
// StatsExporter::Handler is the interface for push exporters that export
|
||||
// recorded data for registered views. The exporter should provide a static
|
||||
@@ -0,0 +1,14 @@
|
||||
diff --git a/exporters/otlp/BUILD b/exporters/otlp/BUILD
|
||||
index 1234567..abcdefg 100644
|
||||
--- a/exporters/otlp/BUILD
|
||||
+++ b/exporters/otlp/BUILD
|
||||
@@ -42,6 +42,9 @@ cc_library(
|
||||
"include/opentelemetry/exporters/otlp/protobuf_include_prefix.h",
|
||||
"include/opentelemetry/exporters/otlp/protobuf_include_suffix.h",
|
||||
],
|
||||
+ defines = [
|
||||
+ "ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW",
|
||||
+ ],
|
||||
strip_include_prefix = "include",
|
||||
tags = [
|
||||
"otlp",
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
|
||||
load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||
|
||||
# OS+CPU compound settings are needed because config.h differs by both.
|
||||
config_setting(
|
||||
name = "osx_arm64",
|
||||
constraint_values = [
|
||||
"@platforms//os:osx",
|
||||
"@platforms//cpu:aarch64",
|
||||
],
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "osx_x86_64",
|
||||
constraint_values = [
|
||||
"@platforms//os:osx",
|
||||
"@platforms//cpu:x86_64",
|
||||
],
|
||||
)
|
||||
|
||||
# config.h is generated by autoconf; rules_boost ships pre-built copies per platform.
|
||||
copy_file(
|
||||
name = "copy_config",
|
||||
src = selects.with_or({
|
||||
"@platforms//os:linux": "@com_github_nelhage_rules_boost//:config.lzma-linux.h",
|
||||
":osx_arm64": "@com_github_nelhage_rules_boost//:config.lzma-osx-arm64.h",
|
||||
":osx_x86_64": "@com_github_nelhage_rules_boost//:config.lzma-osx-x86_64.h",
|
||||
"@platforms//os:windows": "@com_github_nelhage_rules_boost//:config.lzma-windows.h",
|
||||
}),
|
||||
out = "src/liblzma/api/config.h",
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "lzma",
|
||||
srcs = glob(
|
||||
["src/**/*.c"],
|
||||
exclude = [
|
||||
# CLI tools, not library code
|
||||
"src/common/tuklib_exit.c",
|
||||
"src/common/tuklib_mbstr_fw.c",
|
||||
"src/common/tuklib_mbstr_width.c",
|
||||
"src/common/tuklib_open_stdxxx.c",
|
||||
"src/common/tuklib_progname.c",
|
||||
"src/lzmainfo/**",
|
||||
"src/xz/**",
|
||||
"src/xzdec/**",
|
||||
# Standalone table-generator programs (have main())
|
||||
"src/liblzma/check/crc32_tablegen.c",
|
||||
"src/liblzma/check/crc64_tablegen.c",
|
||||
"src/liblzma/lzma/fastpos_tablegen.c",
|
||||
"src/liblzma/rangecoder/price_tablegen.c",
|
||||
# Slower alternatives that conflict with *_fast.c
|
||||
"src/liblzma/check/crc32_small.c",
|
||||
"src/liblzma/check/crc64_small.c",
|
||||
],
|
||||
) + glob(
|
||||
["src/**/*.h"],
|
||||
exclude = ["src/liblzma/api/**"],
|
||||
),
|
||||
hdrs = [
|
||||
"src/liblzma/api/config.h",
|
||||
] + glob(["src/liblzma/api/**/*.h"]),
|
||||
# Internal search paths use -Ipath (no space) rather than the includes
|
||||
# attribute: on Windows, Bazel 7 writes each copt token as a separate
|
||||
# params-file line and MSVC rejects "/I" alone (D8004).
|
||||
copts = select({
|
||||
"@platforms//os:windows": [],
|
||||
"//conditions:default": ["-std=c99"],
|
||||
}) + [
|
||||
"-Iexternal/org_lzma_lzma/src/common",
|
||||
"-Iexternal/org_lzma_lzma/src/liblzma",
|
||||
"-Iexternal/org_lzma_lzma/src/liblzma/api",
|
||||
"-Iexternal/org_lzma_lzma/src/liblzma/common",
|
||||
"-Iexternal/org_lzma_lzma/src/liblzma/check",
|
||||
"-Iexternal/org_lzma_lzma/src/liblzma/delta",
|
||||
"-Iexternal/org_lzma_lzma/src/liblzma/lz",
|
||||
"-Iexternal/org_lzma_lzma/src/liblzma/lzma",
|
||||
"-Iexternal/org_lzma_lzma/src/liblzma/rangecoder",
|
||||
"-Iexternal/org_lzma_lzma/src/liblzma/simple",
|
||||
],
|
||||
defines = select({
|
||||
"@platforms//os:windows": ["LZMA_API_STATIC"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
strip_include_prefix = "src/liblzma/api",
|
||||
linkopts = select({
|
||||
"@platforms//os:windows": [],
|
||||
"//conditions:default": ["-lpthread"],
|
||||
}),
|
||||
linkstatic = select({
|
||||
"@platforms//os:windows": True,
|
||||
"//conditions:default": False,
|
||||
}),
|
||||
local_defines = [
|
||||
"HAVE_CONFIG_H",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
diff --git core/src/histogram.cc core/src/histogram.cc
|
||||
--- core/src/histogram.cc
|
||||
+++ core/src/histogram.cc
|
||||
@@ -6,1 +6,3 @@
|
||||
#include <numeric>
|
||||
+#include <stdexcept>
|
||||
+#include <limits>
|
||||
--
|
||||
@@ -0,0 +1,51 @@
|
||||
Target an older version of Windows SDK so that we don't get a conflicting definition of struct pollfd
|
||||
|
||||
Windows Vista and later SDKs define struct pollfd for WSAPoll(), but it has a permanent bug:
|
||||
- https://curl.haxx.se/mail/lib-2012-08/0014.html
|
||||
- https://curl.haxx.se/mail/lib-2012-10/0038.html
|
||||
civetweb provides its own implementation of poll, but it has a conflicting definition for pollfd.
|
||||
Hence we block Windows from defining pollfd (which this project doesn't use).
|
||||
---
|
||||
bazel/civetweb.BUILD | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git bazel/civetweb.BUILD bazel/civetweb.BUILD
|
||||
--- bazel/civetweb.BUILD
|
||||
+++ bazel/civetweb.BUILD
|
||||
@@ -9,6 +9,11 @@ config_setting(
|
||||
values = {"cpu": "darwin_x86_64"},
|
||||
)
|
||||
|
||||
+config_setting(
|
||||
+ name = "darwin_arm64",
|
||||
+ values = {"cpu": "darwin_arm64"},
|
||||
+)
|
||||
+
|
||||
config_setting(
|
||||
name = "windows",
|
||||
values = { "cpu": "x64_windows" },
|
||||
@@ -34,6 +39,7 @@ cc_library(
|
||||
"-DNO_CACHING",
|
||||
"-DNO_SSL",
|
||||
"-DNO_FILES",
|
||||
+ "-D_WIN32_WINNT=0x0502",
|
||||
"-UDEBUG",
|
||||
],
|
||||
includes = [
|
||||
@@ -46,6 +52,7 @@ cc_library(
|
||||
}) + select({
|
||||
":darwin": [],
|
||||
":darwin_x86_64": [],
|
||||
+ ":darwin_arm64": [],
|
||||
":windows": [],
|
||||
":windows_msvc": [],
|
||||
"//conditions:default": ["-lrt"],
|
||||
@@ -86,6 +93,7 @@ cc_library(
|
||||
}) + select({
|
||||
":darwin": [],
|
||||
":darwin_x86_64": [],
|
||||
+ ":darwin_arm64": [],
|
||||
":windows": [],
|
||||
":windows_msvc": [],
|
||||
"//conditions:default": ["-lrt"],
|
||||
--
|
||||
@@ -0,0 +1,30 @@
|
||||
From 78ac107937ee3b94f0b011f9ef0c12b912a222e7 Mon Sep 17 00:00:00 2001
|
||||
From: easy <g-easy@users.noreply.github.com>
|
||||
Date: Wed, 14 Nov 2018 16:49:24 +1100
|
||||
Subject: [PATCH] Rename net_zlib_zlib to com_github_madler_zlib to match gRPC.
|
||||
|
||||
diff --git README.md README.md
|
||||
index be8e683..1dbc917 100644
|
||||
--- README.md
|
||||
+++ README.md
|
||||
@@ -142,1 +142,1 @@ you introduce the following dependencies, if they do not exist yet, to your proj
|
||||
-* `load_net_zlib_zlib()` to load `net_zlib_zlib` rules for zlib
|
||||
+* `load_com_github_madler_zlib()` to load `com_github_madler_zlib` rules for zlib
|
||||
diff --git pull/BUILD.bazel pull/BUILD.bazel
|
||||
index 6d90c23..d35f63e 100644
|
||||
--- pull/BUILD.bazel
|
||||
+++ pull/BUILD.bazel
|
||||
@@ -26,1 +26,1 @@ cc_library(
|
||||
- "@net_zlib_zlib//:z",
|
||||
+ "@com_github_madler_zlib//:z",
|
||||
diff --git bazel/repositories.bzl bazel/repositories.bzl
|
||||
index 258b73f..91398cf 100644
|
||||
--- bazel/repositories.bzl
|
||||
+++ bazel/repositories.bzl
|
||||
@@ -48,3 +48,4 @@ def prometheus_cpp_repositories():
|
||||
maybe(
|
||||
http_archive,
|
||||
- name = "net_zlib_zlib",
|
||||
+ # Named "com_github_madler_zlib" to match gRPC's import of zlib.
|
||||
+ name = "com_github_madler_zlib",
|
||||
--
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
diff -u bazel/repositories.bzl /tmp/repositories.bzl
|
||||
--- bazel/repositories.bzl
|
||||
+++ bazel/repositories.bzl
|
||||
@@ -56,4 +56,7 @@
|
||||
"https://zlib.net/zlib-1.2.11.tar.gz",
|
||||
],
|
||||
build_file = "@com_github_jupp0r_prometheus_cpp//bazel:zlib.BUILD",
|
||||
+ patches = [
|
||||
+ "@io_ray//thirdparty/patches:zlib-fdopen.patch",
|
||||
+ ]
|
||||
)
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
--- a/src/google/protobuf/BUILD.bazel
|
||||
+++ b/src/google/protobuf/BUILD.bazel
|
||||
@@ -141,1 +141,1 @@
|
||||
- exec_tools = ["//:protoc"],
|
||||
+ tools = ["//:protoc"],
|
||||
|
||||
--- a/build_defs/internal_shell.bzl
|
||||
+++ b/build_defs/internal_shell.bzl
|
||||
@@ -35,1 +35,1 @@
|
||||
- exec_tools = tools,
|
||||
+ tools = tools,
|
||||
@@ -80,1 +80,1 @@
|
||||
- exec_tools = tools,
|
||||
+ tools = tools,
|
||||
|
||||
--- a/objectivec/BUILD.bazel
|
||||
+++ b/objectivec/BUILD.bazel
|
||||
@@ -45,1 +45,1 @@
|
||||
- exec_tools = ["//:protoc"],
|
||||
+ tools = ["//:protoc"],
|
||||
Vendored
+91
@@ -0,0 +1,91 @@
|
||||
diff --git a/deps/Makefile b/deps/Makefile
|
||||
index 3bf0363d5..ea5d12cd4 100644
|
||||
--- a/deps/Makefile
|
||||
+++ b/deps/Makefile
|
||||
@@ -51,25 +51,25 @@ ifneq (,$(filter $(BUILD_TLS),yes module))
|
||||
endif
|
||||
|
||||
hiredis: .make-prerequisites
|
||||
- @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
|
||||
+ #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
|
||||
cd hiredis && $(MAKE) static $(HIREDIS_MAKE_FLAGS)
|
||||
|
||||
.PHONY: hiredis
|
||||
|
||||
linenoise: .make-prerequisites
|
||||
- @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
|
||||
+ #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
|
||||
cd linenoise && $(MAKE)
|
||||
|
||||
.PHONY: linenoise
|
||||
|
||||
hdr_histogram: .make-prerequisites
|
||||
- @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
|
||||
+ #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
|
||||
cd hdr_histogram && $(MAKE)
|
||||
|
||||
.PHONY: hdr_histogram
|
||||
|
||||
fpconv: .make-prerequisites
|
||||
- @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
|
||||
+ #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
|
||||
cd fpconv && $(MAKE)
|
||||
|
||||
.PHONY: fpconv
|
||||
@@ -98,7 +98,7 @@ AR=ar
|
||||
ARFLAGS=rc
|
||||
|
||||
lua: .make-prerequisites
|
||||
- @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
|
||||
+ #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
|
||||
cd lua/src && $(MAKE) all CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)" AR="$(AR) $(ARFLAGS)"
|
||||
|
||||
.PHONY: lua
|
||||
@@ -111,7 +111,7 @@ JEMALLOC_CONFIGURE_OPTS += --host=$(DEB_HOST_GNU_TYPE)
|
||||
endif
|
||||
|
||||
jemalloc: .make-prerequisites
|
||||
- @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
|
||||
+ #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
|
||||
cd jemalloc && ./configure --disable-cxx --with-version=5.3.0-0-g0 --with-lg-quantum=3 --disable-cache-oblivious --with-jemalloc-prefix=je_ CFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)" $(JEMALLOC_CONFIGURE_OPTS)
|
||||
cd jemalloc && $(MAKE) lib/libjemalloc.a
|
||||
|
||||
diff --git a/deps/jemalloc/Makefile.in b/deps/jemalloc/Makefile.in
|
||||
index 1193cd859..140995eb5 100644
|
||||
--- a/deps/jemalloc/Makefile.in
|
||||
+++ b/deps/jemalloc/Makefile.in
|
||||
@@ -496,7 +496,7 @@ $(objroot)include/jemalloc/internal/private_namespace_jet.gen.h: $(C_JET_SYMS)
|
||||
$(SHELL) $(srcroot)include/jemalloc/internal/private_namespace.sh $^ > $@
|
||||
|
||||
%.h: %.gen.h
|
||||
- @if ! `cmp -s $< $@` ; then echo "cp $< $@"; cp $< $@ ; fi
|
||||
+ @if ! `cmp -s $< $@` ; then cp $< $@ ; fi
|
||||
|
||||
$(CPP_OBJS) $(CPP_PIC_OBJS) $(TESTS_CPP_OBJS): %.$(O):
|
||||
@mkdir -p $(@D)
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index ecbd2753d..737a14777 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -116,7 +116,7 @@ endif
|
||||
# Override default settings if possible
|
||||
-include .make-settings
|
||||
|
||||
-FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
|
||||
+FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) $(CPPFLAGS)
|
||||
FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
|
||||
FINAL_LIBS=-lm
|
||||
DEBUG=-g -ggdb
|
||||
@@ -355,9 +355,9 @@ REDIS_CHECK_AOF_NAME=redis-check-aof$(PROG_SUFFIX)
|
||||
ALL_SOURCES=$(sort $(patsubst %.o,%.c,$(REDIS_SERVER_OBJ) $(REDIS_CLI_OBJ) $(REDIS_BENCHMARK_OBJ)))
|
||||
|
||||
all: $(REDIS_SERVER_NAME) $(REDIS_SENTINEL_NAME) $(REDIS_CLI_NAME) $(REDIS_BENCHMARK_NAME) $(REDIS_CHECK_RDB_NAME) $(REDIS_CHECK_AOF_NAME) $(TLS_MODULE)
|
||||
- @echo ""
|
||||
- @echo "Hint: It's a good idea to run 'make test' ;)"
|
||||
- @echo ""
|
||||
+ #@echo ""
|
||||
+ #@echo "Hint: It's a good idea to run 'make test' ;)"
|
||||
+ #@echo ""
|
||||
|
||||
Makefile.dep:
|
||||
-$(REDIS_CC) -MM $(ALL_SOURCES) > Makefile.dep 2> /dev/null || true
|
||||
@@ -0,0 +1,12 @@
|
||||
diff --git BUILD.boost BUILD.boost
|
||||
--- BUILD.boost
|
||||
+++ BUILD.boost
|
||||
@@ -428,6 +428,7 @@ boost_library(
|
||||
}),
|
||||
linkopts = select({
|
||||
":android": [],
|
||||
+ ":windows": [],
|
||||
"//conditions:default": ["-lpthread"],
|
||||
}),
|
||||
deps = [
|
||||
--
|
||||
@@ -0,0 +1,34 @@
|
||||
commit 2d6bc609769eaa4a70a6dd384351f54c6633f3a9
|
||||
Author: dentiny <dentinyhao@gmail.com>
|
||||
Date: Thu Dec 19 17:17:56 2024 +0000
|
||||
|
||||
patch spdlog rotation filename
|
||||
|
||||
Signed-off-by: dentiny <dentinyhao@gmail.com>
|
||||
|
||||
diff --git a/include/spdlog/sinks/rotating_file_sink-inl.h b/include/spdlog/sinks/rotating_file_sink-inl.h
|
||||
index cf8b9d5c..7580c06f 100644
|
||||
--- a/include/spdlog/sinks/rotating_file_sink-inl.h
|
||||
+++ b/include/spdlog/sinks/rotating_file_sink-inl.h
|
||||
@@ -49,7 +49,7 @@ SPDLOG_INLINE rotating_file_sink<Mutex>::rotating_file_sink(
|
||||
}
|
||||
|
||||
// calc filename according to index and file extension if exists.
|
||||
-// e.g. calc_filename("logs/mylog.txt, 3) => "logs/mylog.3.txt".
|
||||
+// e.g. calc_filename("logs/mylog.txt, 3) => "logs/mylog.txt.3".
|
||||
template <typename Mutex>
|
||||
SPDLOG_INLINE filename_t rotating_file_sink<Mutex>::calc_filename(const filename_t &filename,
|
||||
std::size_t index) {
|
||||
@@ -57,10 +57,7 @@ SPDLOG_INLINE filename_t rotating_file_sink<Mutex>::calc_filename(const filename
|
||||
return filename;
|
||||
}
|
||||
|
||||
- filename_t basename;
|
||||
- filename_t ext;
|
||||
- std::tie(basename, ext) = details::file_helper::split_by_extension(filename);
|
||||
- return fmt_lib::format(SPDLOG_FMT_STRING(SPDLOG_FILENAME_T("{}.{}{}")), basename, index, ext);
|
||||
+ return fmt_lib::format(SPDLOG_FMT_STRING(SPDLOG_FILENAME_T("{}.{}")), filename, index);
|
||||
}
|
||||
|
||||
template <typename Mutex>
|
||||
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
diff -u zlib/zutil.h zlib/zutil.h
|
||||
--- ./zutil.h
|
||||
+++ ./zutil.h
|
||||
@@ -139,15 +139,6 @@
|
||||
|
||||
#if defined(MACOS) || defined(TARGET_OS_MAC)
|
||||
# define OS_CODE 7
|
||||
-# ifndef Z_SOLO
|
||||
-# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
|
||||
-# include <unix.h> /* for fdopen */
|
||||
-# else
|
||||
-# ifndef fdopen
|
||||
-# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
-# endif
|
||||
-# endif
|
||||
-# endif
|
||||
#endif
|
||||
|
||||
#ifdef __acorn
|
||||
+184
@@ -0,0 +1,184 @@
|
||||
// Copyright 2014 The Bazel Authors. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// proto definitions for the blaze extra_action feature.
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
package blaze;
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "com.google.devtools.build.lib.actions.extra";
|
||||
// option cc_api_version = 2;
|
||||
// option java_api_version = 2;
|
||||
|
||||
// A list of extra actions and metadata for the print_action command.
|
||||
message ExtraActionSummary {
|
||||
repeated DetailedExtraActionInfo action = 1;
|
||||
}
|
||||
|
||||
// An individual action printed by the print_action command.
|
||||
message DetailedExtraActionInfo {
|
||||
// If the given action was included in the output due to a request for a
|
||||
// specific file, then this field contains the name of that file so that the
|
||||
// caller can correctly associate the extra action with that file.
|
||||
//
|
||||
// The data in this message is currently not sufficient to run the action on a
|
||||
// production machine, because not all necessary input files are identified,
|
||||
// especially for C++.
|
||||
//
|
||||
// There is no easy way to fix this; we could require that all header files
|
||||
// are declared and then add all of them here (which would be a huge superset
|
||||
// of the files that are actually required), or we could run the include
|
||||
// scanner and add those files here.
|
||||
optional string triggering_file = 1;
|
||||
// The actual action.
|
||||
required ExtraActionInfo action = 2;
|
||||
}
|
||||
|
||||
// Provides information to an extra_action on the original action it is
|
||||
// shadowing.
|
||||
message ExtraActionInfo {
|
||||
extensions 1000 to max;
|
||||
|
||||
// The label of the ActionOwner of the shadowed action.
|
||||
optional string owner = 1;
|
||||
|
||||
// Only set if the owner is an Aspect.
|
||||
// Corresponds to AspectValue.AspectKey.getAspectClass.getName()
|
||||
// This field is deprecated as there might now be
|
||||
// multiple aspects applied to the same target.
|
||||
// This is the aspect name of the last aspect
|
||||
// in 'aspects' (8) field.
|
||||
optional string aspect_name = 6 [deprecated = true];
|
||||
|
||||
// Only set if the owner is an Aspect.
|
||||
// Corresponds to AspectValue.AspectKey.getParameters()
|
||||
// This field is deprecated as there might now be
|
||||
// multiple aspects applied to the same target.
|
||||
// These are the aspect parameters of the last aspect
|
||||
// in 'aspects' (8) field.
|
||||
map<string, StringList> aspect_parameters = 7 [deprecated = true];
|
||||
message StringList {
|
||||
option deprecated = true;
|
||||
repeated string value = 1;
|
||||
}
|
||||
|
||||
message AspectDescriptor {
|
||||
// Corresponds to AspectDescriptor.getName()
|
||||
optional string aspect_name = 1;
|
||||
// Corresponds to AspectDescriptor.getParameters()
|
||||
map<string, StringList> aspect_parameters = 2;
|
||||
message StringList {
|
||||
repeated string value = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// If the owner is an aspect, all aspects applied to the target
|
||||
repeated AspectDescriptor aspects = 8;
|
||||
|
||||
// An id uniquely describing the shadowed action at the ActionOwner level.
|
||||
optional string id = 2;
|
||||
|
||||
// The mnemonic of the shadowed action. Used to distinguish actions with the
|
||||
// same ActionType.
|
||||
optional string mnemonic = 5;
|
||||
}
|
||||
|
||||
message EnvironmentVariable {
|
||||
// It is possible that this name is not a valid variable identifier.
|
||||
required string name = 1;
|
||||
// The value is unescaped and unquoted.
|
||||
required string value = 2;
|
||||
}
|
||||
|
||||
// Provides access to data that is specific to spawn actions.
|
||||
// Usually provided by actions using the "Spawn" & "Genrule" Mnemonics.
|
||||
message SpawnInfo {
|
||||
extend ExtraActionInfo {
|
||||
optional SpawnInfo spawn_info = 1003;
|
||||
}
|
||||
|
||||
repeated string argument = 1;
|
||||
// A list of environment variables and their values. No order is enforced.
|
||||
repeated EnvironmentVariable variable = 2;
|
||||
repeated string input_file = 4;
|
||||
repeated string output_file = 5;
|
||||
}
|
||||
|
||||
// Provides access to data that is specific to C++ compile actions.
|
||||
// Usually provided by actions using the "CppCompile" Mnemonic.
|
||||
message CppCompileInfo {
|
||||
extend ExtraActionInfo {
|
||||
optional CppCompileInfo cpp_compile_info = 1001;
|
||||
}
|
||||
|
||||
optional string tool = 1;
|
||||
repeated string compiler_option = 2;
|
||||
optional string source_file = 3;
|
||||
optional string output_file = 4;
|
||||
// Due to header discovery, this won't include headers unless the build is
|
||||
// actually performed. If set, this field will include the value of
|
||||
// "source_file" in addition to the headers.
|
||||
repeated string sources_and_headers = 5;
|
||||
// A list of environment variables and their values. No order is enforced.
|
||||
repeated EnvironmentVariable variable = 6;
|
||||
}
|
||||
|
||||
// Provides access to data that is specific to C++ link actions.
|
||||
// Usually provided by actions using the "CppLink" Mnemonic.
|
||||
message CppLinkInfo {
|
||||
extend ExtraActionInfo {
|
||||
optional CppLinkInfo cpp_link_info = 1002;
|
||||
}
|
||||
|
||||
repeated string input_file = 1;
|
||||
optional string output_file = 2;
|
||||
optional string interface_output_file = 3;
|
||||
optional string link_target_type = 4;
|
||||
optional string link_staticness = 5;
|
||||
repeated string link_stamp = 6;
|
||||
repeated string build_info_header_artifact = 7;
|
||||
// The list of command line options used for running the linking tool.
|
||||
repeated string link_opt = 8;
|
||||
}
|
||||
|
||||
// Provides access to data that is specific to java compile actions.
|
||||
// Usually provided by actions using the "Javac" Mnemonic.
|
||||
message JavaCompileInfo {
|
||||
extend ExtraActionInfo {
|
||||
optional JavaCompileInfo java_compile_info = 1000;
|
||||
}
|
||||
|
||||
optional string outputjar = 1;
|
||||
repeated string classpath = 2;
|
||||
repeated string sourcepath = 3;
|
||||
repeated string source_file = 4;
|
||||
repeated string javac_opt = 5;
|
||||
repeated string processor = 6;
|
||||
repeated string processorpath = 7;
|
||||
repeated string bootclasspath = 8;
|
||||
repeated string argument = 9;
|
||||
}
|
||||
|
||||
// Provides access to data that is specific to python rules.
|
||||
// Usually provided by actions using the "Python" Mnemonic.
|
||||
message PythonInfo {
|
||||
extend ExtraActionInfo {
|
||||
optional PythonInfo python_info = 1005;
|
||||
}
|
||||
|
||||
repeated string source_file = 1;
|
||||
repeated string dep_file = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user