Skip to content

Commit 1c84e4d

Browse files
Adjust to the new clang builtin modules
clang is adding builtin modules for its C standard library headers. This requires proper module layering with the OS/SDK headers, but Backtracing is currently just absorbing them all into its OS module. Pass `-Xclang -fbuiltin-headers-in-system-modules` to allow that to continue working. Explicitly include <stddef.h> so that it gets exported from the OS module.
1 parent 0db93e2 commit 1c84e4d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

stdlib/public/Backtracing/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ set(BACKTRACING_COMPILE_FLAGS
5151
"-Xcc;-I${CMAKE_BINARY_DIR}/include"
5252
"-Xcc;-fno-implicit-module-maps"
5353
"-Xcc;-fbuiltin-module-map"
54+
"-Xcc;-Xclang;-Xcc;-fbuiltin-headers-in-system-modules"
5455
"-Xcc;-fmodule-map-file=${SWIFT_STDLIB_SOURCE_DIR}/public/SwiftShims/swift/shims/module.modulemap"
5556
"-Xcc;-fmodule-map-file=${SWIFT_STDLIB_SOURCE_DIR}/public/Backtracing/modules/module.modulemap")
5657

stdlib/public/Backtracing/modules/OS/Linux.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#ifdef __linux__
2020

2121
#define _GNU_SOURCE
22+
#include <stddef.h>
2223
#include <sys/uio.h>
2324
#include <ucontext.h>
2425

0 commit comments

Comments
 (0)