Skip to content

Commit 5ad45d8

Browse files
jhuber6yuxuanchen1997
authored andcommitted
[libc] Use <assert.h> in overlay mode for LIBC_ASSERT (#99875)
Summary: This uses `internal::exit` which is not built in overlay mode, leading to linker errors. Fix this to just use `assert.h`. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251138
1 parent a490f85 commit 5ad45d8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

libc/src/__support/libc_assert.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#define LLVM_LIBC_SRC___SUPPORT_LIBC_ASSERT_H
1111

1212
#include "src/__support/macros/config.h"
13-
#ifdef LIBC_COPT_USE_C_ASSERT
13+
#if defined(LIBC_COPT_USE_C_ASSERT) || !defined(LIBC_FULL_BUILD)
1414

1515
// The build is configured to just use the public <assert.h> API
1616
// for libc's internal assertions.

libc/src/__support/threads/linux/raw_mutex.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "src/__support/libc_assert.h"
1414
#include "src/__support/macros/attributes.h"
1515
#include "src/__support/macros/config.h"
16+
#include "src/__support/macros/optimization.h"
1617
#include "src/__support/threads/linux/futex_utils.h"
1718
#include "src/__support/threads/linux/futex_word.h"
1819
#include "src/__support/threads/sleep.h"

0 commit comments

Comments
 (0)