[libc-commits] [libc] [libc][CMake] Set library type of libc_diff_test_utils to STATIC (PR #99869)

via libc-commits libc-commits at lists.llvm.org
Mon Jul 22 05:38:04 PDT 2024


https://github.com/overmighty created https://github.com/llvm/llvm-project/pull/99869

Fixes linker errors due to hidden symbols when running CMake with
-DBUILD_SHARED_LIBS=ON.


>From a67aad22bbe34b9e8d987d3dc95c08915b560dae Mon Sep 17 00:00:00 2001
From: OverMighty <its.overmighty at gmail.com>
Date: Mon, 22 Jul 2024 14:36:08 +0200
Subject: [PATCH] [libc][CMake] Set library type of libc_diff_test_utils to
 STATIC

Fixes linker errors due to hidden symbols when running CMake with
-DBUILD_SHARED_LIBS=ON.
---
 libc/test/src/math/performance_testing/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/test/src/math/performance_testing/CMakeLists.txt b/libc/test/src/math/performance_testing/CMakeLists.txt
index a75becba04d07..2ec5364059b17 100644
--- a/libc/test/src/math/performance_testing/CMakeLists.txt
+++ b/libc/test/src/math/performance_testing/CMakeLists.txt
@@ -1,5 +1,5 @@
 add_library(
-  libc_diff_test_utils
+  libc_diff_test_utils STATIC
   Timer.cpp
   Timer.h
 )



More information about the libc-commits mailing list