From 772cb926243e6c3506c48d4e636359f8de397135 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 22 Jun 2023 11:43:35 -0700 Subject: rust: get stdlib arguments for non-rust languages when linking Otherwise we might not get things like libstdc++, which we need. --- test cases/rust/20 rust and cpp/lib.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test cases/rust/20 rust and cpp/lib.cpp (limited to 'test cases/rust/20 rust and cpp/lib.cpp') diff --git a/test cases/rust/20 rust and cpp/lib.cpp b/test cases/rust/20 rust and cpp/lib.cpp new file mode 100644 index 000000000..b08f870e2 --- /dev/null +++ b/test cases/rust/20 rust and cpp/lib.cpp @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright © 2023 Intel Corporation + +#include "lib.hpp" + +#include + +namespace { + +uint64_t priv_length(const std::string & str) { + return str.length(); +} + +} + +extern "C" uint64_t lib_length(const char * str) { + return priv_length(str); +} -- cgit v1.2.3