Skip to content

[libc][CMake] Set library type of libcMPFRWrapper to STATIC #99527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

overmighty
Copy link
Member

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

Fixes linker errors due to hidden symbols when running CMake with
-DBUILD_SHARED_LIBS=ON.
@overmighty overmighty requested a review from lntue July 18, 2024 17:00
@llvmbot llvmbot added the libc label Jul 18, 2024
@llvmbot
Copy link
Member

llvmbot commented Jul 18, 2024

@llvm/pr-subscribers-libc

Author: OverMighty (overmighty)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/99527.diff

1 Files Affected:

  • (modified) libc/utils/MPFRWrapper/CMakeLists.txt (+1-1)
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

@overmighty overmighty merged commit f61c9a9 into llvm:main Jul 18, 2024
8 checks passed
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
Summary:
Fixes linker errors due to hidden symbols when running CMake with
-DBUILD_SHARED_LIBS=ON.

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60251312
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants