Skip to content

[libc] suppress stdlib explicitly #76079

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
Dec 20, 2023

Conversation

SchrodingerZhu
Copy link
Contributor

No description provided.

@llvmbot llvmbot added the libc label Dec 20, 2023
@llvmbot
Copy link
Member

llvmbot commented Dec 20, 2023

@llvm/pr-subscribers-libc

Author: Schrodinger ZHU Yifan (SchrodingerZhu)

Changes

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

1 Files Affected:

  • (modified) libc/startup/linux/CMakeLists.txt (+1-1)
diff --git a/libc/startup/linux/CMakeLists.txt b/libc/startup/linux/CMakeLists.txt
index d81c7db7a558b3..2d55a365669718 100644
--- a/libc/startup/linux/CMakeLists.txt
+++ b/libc/startup/linux/CMakeLists.txt
@@ -26,7 +26,7 @@ function(merge_relocatable_object name)
   )
   # Pass -r to the driver is much cleaner than passing -Wl,-r: the compiler knows it is
   # a relocatable linking and will not pass other irrelevant flags to the linker.
-  target_link_options(${relocatable_target} PRIVATE -r)
+  target_link_options(${relocatable_target} PRIVATE -r -nostdlib)
   set_target_properties(
     ${relocatable_target}
     PROPERTIES

@nickdesaulniers
Copy link
Member

I'm going to merge this to see if it unbreaks the build.

If not, we should revert this plus #75413.

Thanks for the quick patch!

@SchrodingerZhu
Copy link
Contributor Author

Ok, let's see if this will make the CI happy.

@nickdesaulniers nickdesaulniers merged commit 7a87ff6 into llvm:main Dec 20, 2023
@SchrodingerZhu SchrodingerZhu deleted the libc/relocatable-fixup branch December 20, 2023 20:43
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