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

via libc-commits libc-commits at lists.llvm.org
Thu Jul 18 10:00:26 PDT 2024


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

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


>From d7cd12e53e8a79ce25ff31be87cde8b24a137e51 Mon Sep 17 00:00:00 2001
From: OverMighty <its.overmighty at gmail.com>
Date: Thu, 18 Jul 2024 18:54:10 +0200
Subject: [PATCH] [libc][CMake] Set library type of libcMPFRWrapper to STATIC

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

diff --git a/libc/utils/MPFRWrapper/CMakeLists.txt b/libc/utils/MPFRWrapper/CMakeLists.txt
index e74b02204ed6f..be0415d0956fa 100644
--- a/libc/utils/MPFRWrapper/CMakeLists.txt
+++ b/libc/utils/MPFRWrapper/CMakeLists.txt
@@ -1,5 +1,5 @@
 if(LIBC_TESTS_CAN_USE_MPFR)
-  add_library(libcMPFRWrapper
+  add_library(libcMPFRWrapper STATIC
     MPFRUtils.cpp
     MPFRUtils.h
     mpfr_inc.h



More information about the libc-commits mailing list