From: Francis Deslauriers Date: Thu, 28 Apr 2022 14:15:26 +0000 (-0400) Subject: cli: Rename `logging.c` to `logging.cpp` to force C++ linking X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=bc7b4a4f1ddef170f31c9f74a8d5576e50b41700 cli: Rename `logging.c` to `logging.cpp` to force C++ linking This is to force the linking of the babeltrace2 binary using a C++ linker. This is necessary to support the Babeltrace2 static build once we start depending on C++ symbols. Signed-off-by: Francis Deslauriers Change-Id: Ife9967d9362c7648b6ea031f453262a10aa03483 Reviewed-on: https://review.lttng.org/c/babeltrace/+/7954 Reviewed-by: Michael Jeanson Reviewed-by: Philippe Proulx Reviewed-on: https://review.lttng.org/c/babeltrace/+/9597 CI-Build: Simon Marchi Reviewed-by: Simon Marchi Tested-by: Simon Marchi --- diff --git a/src/cli/Makefile.am b/src/cli/Makefile.am index adbf2bb0..29a6478e 100644 --- a/src/cli/Makefile.am +++ b/src/cli/Makefile.am @@ -38,7 +38,7 @@ babeltrace2_bin_SOURCES = \ babeltrace2-plugins.h \ babeltrace2-query.c \ babeltrace2-query.h \ - logging.c \ + logging.cpp \ logging.h # -Wl,--no-as-needed is needed for recent gold linker who seems to think diff --git a/src/cli/logging.c b/src/cli/logging.c deleted file mode 100644 index 329cb70a..00000000 --- a/src/cli/logging.c +++ /dev/null @@ -1,10 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - * - * Copyright (c) 2017 Philippe Proulx - */ - -#define BT_LOG_OUTPUT_LEVEL bt_cli_log_level -#include "logging/log.h" - -BT_LOG_INIT_LOG_LEVEL(bt_cli_log_level, "BABELTRACE_CLI_LOG_LEVEL"); diff --git a/src/cli/logging.cpp b/src/cli/logging.cpp new file mode 100644 index 00000000..329cb70a --- /dev/null +++ b/src/cli/logging.cpp @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2017 Philippe Proulx + */ + +#define BT_LOG_OUTPUT_LEVEL bt_cli_log_level +#include "logging/log.h" + +BT_LOG_INIT_LOG_LEVEL(bt_cli_log_level, "BABELTRACE_CLI_LOG_LEVEL");