mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Reported by: mikael Obtained from: https://cgit.freebsd.org/ports/commit/?id=2ea9b7459046eac3f7f3fcd7515cb0fb0340fccb
25 lines
871 B
C++
25 lines
871 B
C++
--- build/rust/allocator/alias.cc.orig 2025-05-20 09:16:26 UTC
|
|
+++ build/rust/allocator/alias.cc
|
|
@@ -0,0 +1,22 @@
|
|
+// Copyright 2023 The Chromium Authors
|
|
+// Use of this source code is governed by a BSD-style license that can be
|
|
+// found in the LICENSE file.
|
|
+
|
|
+// This file has been copied from //base/debug/alias.cc ( additionally the APIs
|
|
+// were moved into the `build_rust_std` namespace).
|
|
+//
|
|
+// TODO(crbug.com/40279749): Avoid code duplication / reuse code.
|
|
+
|
|
+#include "build/rust/allocator/alias.h"
|
|
+
|
|
+#include "build/rust/allocator/compiler_specific.h"
|
|
+
|
|
+namespace build_rust_std {
|
|
+namespace debug {
|
|
+
|
|
+// This file/function should be excluded from LTO/LTCG to ensure that the
|
|
+// compiler can't see this function's implementation when compiling calls to it.
|
|
+NOINLINE void Alias(const void* var) {}
|
|
+
|
|
+} // namespace debug
|
|
+} // namespace build_rust_std
|