cli: Rename `logging.c` to `logging.cpp` to force C++ linking
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 28 Apr 2022 14:15:26 +0000 (10:15 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 1 Mar 2023 20:01:01 +0000 (15:01 -0500)
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 <francis.deslauriers@efficios.com>
Change-Id: Ife9967d9362c7648b6ea031f453262a10aa03483
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7954
Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/9597
CI-Build: Simon Marchi <simon.marchi@efficios.com>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
Tested-by: Simon Marchi <simon.marchi@efficios.com>
src/cli/Makefile.am
src/cli/logging.c [deleted file]
src/cli/logging.cpp [new file with mode: 0644]

index adbf2bb06b271911cf25e392a7e4650f1b57e6af..29a6478e8a5c7f4ee0bca258129cae0ca8e55d76 100644 (file)
@@ -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 (file)
index 329cb70..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * SPDX-License-Identifier: MIT
- *
- * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
- */
-
-#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 (file)
index 0000000..329cb70
--- /dev/null
@@ -0,0 +1,10 @@
+/*
+ * SPDX-License-Identifier: MIT
+ *
+ * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
+ */
+
+#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");
This page took 0.033926 seconds and 4 git commands to generate.