Skip to content
Snippets Groups Projects
Commit af4ee238 authored by Florian Schmaus's avatar Florian Schmaus
Browse files

Merge remote-tracking branch 'origin/master' into libc++

parents 142bb376 0bd272ba
Branches
No related tags found
No related merge requests found
image: "flowdalic/debian-testing-dev:1.17"
image: "flowdalic/debian-testing-dev:1.19"
before_script:
- ulimit -a
......@@ -97,6 +97,14 @@ clang-tidy:
CC: clang
CXX: clang++
.libc++:
extends:
- .clang
variables:
EMPER_USE_BUNDLED_DEPS: "always"
EMPER_CPP_ARGS: "-stdlib=libc++"
EMPER_CPP_LINK_ARGS: "-stdlib=libc++"
.emper-ws-scheduling:
variables:
EMPER_DEFAULT_SCHEDULING_STRATEGY: "work_stealing"
......@@ -253,6 +261,17 @@ test-clang-debug:
- test-clang
- .debug-build
smoke-test-libc++:
stage: smoke-test
extends:
- .fast-variant-check
- .libc++
test-libc++:
extends:
- .test
- .libc++
test-worker-no-sleep:
extends:
- .test
......
......@@ -50,6 +50,15 @@ PHONY: sanitize-address
sanitize-address:
$(sanitizer)
libc++:
rm -f build
$(MAKE) build \
CC=clang CXX=clang++ \
EMPER_CPP_ARGS="-stdlib=libc++" \
EMPER_CPP_LINK_ARGS="-stdlib=libc++" \
EMPER_USE_BUNDLED_DEPS="always" \
BUILDDIR="build-libc++"
.PHONY: fast-static-analysis
fast-static-analysis: all check-format check-license doc
......
......@@ -21,12 +21,12 @@
using emper::io::GlobalIoContext;
//static const long NanosInAMinute = 60L * 1000 * 1000 * 1000;
namespace emper::log {
static void add_timestamp_to(UNUSED_ARG std::ostringstream& logMessage) {
#if 0
static void add_timestamp_to(std::ostringstream& logMessage) {
#if defined __GLIBCXX__
static const long NanosInAMinute = 60L * 1000 * 1000 * 1000;
auto now = std::chrono::high_resolution_clock::now();
auto now_time_t = std::chrono::high_resolution_clock::to_time_t(now);
......@@ -54,6 +54,8 @@ static void add_timestamp_to(UNUSED_ARG std::ostringstream& logMessage) {
long remaining_nanos = time_since_epoch_long % NanosInAMinute;
logMessage << remaining_nanos;
#else
logMessage << "UNKN_TIME";
#endif
}
......
......@@ -10,9 +10,12 @@ project('EMPER', 'c', 'cpp',
thread_dep = dependency('threads')
conf_data = configuration_data()
use_bundled_deps = get_option('use_bundled_deps')
liburing_version = '2.0'
uring_dep = dependency('liburing', version: liburing_version, required: false)
if not uring_dep.found()
uring_dep = dependency('liburing', version: liburing_version, required: use_bundled_deps == 'never')
if not uring_dep.found() or use_bundled_deps == 'always'
message('liburing ' + liburing_version + ' not found in system, using liburing subproject')
liburing_sp = subproject('liburing')
uring_dep = liburing_sp.get_variable('uring').as_system()
......@@ -32,7 +35,6 @@ tools_dir = join_paths(meson.source_root(), 'tools')
run_target('iwyu',
command: join_paths(tools_dir, 'check-iwyu'))
conf_data = configuration_data()
option_urcu = get_option('userspace_rcu')
conf_data.set('EMPER_LIBURCU', option_urcu)
if option_urcu
......
option(
'use_bundled_deps',
type: 'combo',
choices: ['automatic', 'always', 'never'],
description: 'Control when the bundled dependencies are used',
value: 'automatic',
)
option(
'userspace_rcu',
type: 'boolean',
......
......@@ -133,10 +133,10 @@ parallel_ok = (not io_uring_enabled)
# Meson integration for GTest and GMock
# See https://mesonbuild.com/Dependencies.html#gtest-and-gmock
gtest_dep = dependency('gtest', main: true, required: false)
gtest_dep = dependency('gtest', main: true, required: use_bundled_deps == 'never')
# If gtest is not available on the system use the meson wrap provided
# by WrapDB and build it ourself
if not gtest_dep.found()
if not gtest_dep.found() or use_bundled_deps == 'always'
gtest_sp = subproject('gtest')
gtest_dep = gtest_sp.get_variable('gtest_main_dep')
endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment