Skip to content

[libc][config] Add malloc as baremetal arm entrypoint #95827

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
Jun 20, 2024

Conversation

PiJoules
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Jun 17, 2024

@llvm/pr-subscribers-libc

Author: None (PiJoules)

Changes

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

1 Files Affected:

  • (modified) libc/config/baremetal/arm/entrypoints.txt (+1)
diff --git a/libc/config/baremetal/arm/entrypoints.txt b/libc/config/baremetal/arm/entrypoints.txt
index 2930d718fdb21..2742780596127 100644
--- a/libc/config/baremetal/arm/entrypoints.txt
+++ b/libc/config/baremetal/arm/entrypoints.txt
@@ -173,6 +173,7 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.stdlib.ldiv
     libc.src.stdlib.llabs
     libc.src.stdlib.lldiv
+    libc.src.stdlib.malloc
     libc.src.stdlib.qsort
     libc.src.stdlib.rand
     libc.src.stdlib.srand

@petrhosek
Copy link
Member

Can you also include it in libc/config/baremetal/riscv/entrypoints.txt? What about calloc and free?

@PiJoules PiJoules force-pushed the malloc-entrypoint branch from 0536f52 to 319d45c Compare June 18, 2024 21:09
@PiJoules
Copy link
Contributor Author

PiJoules commented Jun 18, 2024

Can you also include it in libc/config/baremetal/riscv/entrypoints.txt?

Done.

What about calloc and free?

Those symbols are included with the malloc cmake target, but at some point I should also split them into their separate files/targets. That could probably be done after this patch.

@michaelrj-google
Copy link
Contributor

you should still list calloc and free if you're planning to use them, since they should be listed as dependencies in entrypoints that use them. An entrypoint missing any dependency will get skipped which may cause unexpected behavior.

@PiJoules PiJoules force-pushed the malloc-entrypoint branch from 319d45c to aea9adf Compare June 20, 2024 18:59
@PiJoules
Copy link
Contributor Author

you should still list calloc and free if you're planning to use them, since they should be listed as dependencies in entrypoints that use them. An entrypoint missing any dependency will get skipped which may cause unexpected behavior.

Done

@PiJoules PiJoules force-pushed the malloc-entrypoint branch from aea9adf to 97b3a63 Compare June 20, 2024 20:30
@PiJoules PiJoules merged commit 17af54b into llvm:main Jun 20, 2024
4 of 5 checks passed
@PiJoules PiJoules deleted the malloc-entrypoint branch June 20, 2024 20:32
AlexisPerry pushed a commit to llvm-project-tlp/llvm-project that referenced this pull request Jul 9, 2024
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