forked from OSchip/llvm-project
[libc] Add compile options to pthread_create target.
The compile options now match that of thrd_create. Two compile options are of importance: 1. -O3 - This is required so that stack is not used between the clone syscall and the start function in the child thread. 2. -fno-omit-frame-pointer - This is required so that we can sniff out the thread start args from the child thread's stack memory. Without these two options, pthread_create will exhibit flaky behavior. Reviewed By: lntue, michaelrj Differential Revision: https://reviews.llvm.org/D127381
This commit is contained in:
parent
0bff6a3e39
commit
214be9d1cd
|
@ -253,6 +253,9 @@ add_entrypoint_object(
|
|||
libc.include.errno
|
||||
libc.include.pthread
|
||||
libc.src.__support.threads.thread
|
||||
COMPILE_OPTIONS
|
||||
-O3
|
||||
-fno-omit-frame-pointer
|
||||
)
|
||||
|
||||
add_entrypoint_object(
|
||||
|
|
Loading…
Reference in New Issue