Skip to content

Conversation

@Algunenano
Copy link

Darwin fails to build with _LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1

[2025-12-19 12:30:48] /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/llvm/lib/Support/ProgramStack.cpp:114:17: error: use of undeclared identifier 'malloc'
[2025-12-19 12:30:48]   114 |   void *Stack = malloc(StackSize);
[2025-12-19 12:30:48]       |                 ^~~~~~
[2025-12-19 12:30:48] /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/llvm/lib/Support/ProgramStack.cpp:119:3: error: use of undeclared identifier 'free'
[2025-12-19 12:30:48]   119 |   free(Stack);
[2025-12-19 12:30:48]       |   ^~~~
[2025-12-19 12:30:48] 2 errors generated.

Darwin fails to build with `_LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1`
@github-actions
Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot
Copy link
Member

llvmbot commented Dec 19, 2025

@llvm/pr-subscribers-llvm-support

Author: Raúl Marín (Algunenano)

Changes

Darwin fails to build with _LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1

[2025-12-19 12:30:48] /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/llvm/lib/Support/ProgramStack.cpp:114:17: error: use of undeclared identifier 'malloc'
[2025-12-19 12:30:48]   114 |   void *Stack = malloc(StackSize);
[2025-12-19 12:30:48]       |                 ^~~~~~
[2025-12-19 12:30:48] /home/ubuntu/actions-runner/_work/ClickHouse/ClickHouse/contrib/llvm-project/llvm/lib/Support/ProgramStack.cpp:119:3: error: use of undeclared identifier 'free'
[2025-12-19 12:30:48]   119 |   free(Stack);
[2025-12-19 12:30:48]       |   ^~~~
[2025-12-19 12:30:48] 2 errors generated.

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

1 Files Affected:

  • (modified) llvm/lib/Support/ProgramStack.cpp (+1)
diff --git a/llvm/lib/Support/ProgramStack.cpp b/llvm/lib/Support/ProgramStack.cpp
index 66f74ff660b20..a8c8f00a494a7 100644
--- a/llvm/lib/Support/ProgramStack.cpp
+++ b/llvm/lib/Support/ProgramStack.cpp
@@ -20,6 +20,7 @@
 
 #ifndef LLVM_HAS_SPLIT_STACKS
 # include "llvm/Support/thread.h"
+# include <stdlib.h> // for malloc
 #endif
 
 using namespace llvm;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants