Skip to content

Commit

Permalink
[libcxx] [test] Don't pass INCLUDE to clang via -isystem
Browse files Browse the repository at this point in the history
Passing the MSVC include dirs via -isystem makes them included before
clang's own include resource dir (<prefix>/lib/clang/<version>/include).
This causes includes of stddef.h to bypass clang's stddef.h which
defines max_align_t, which libc++ needs defined.

This was added in 4372f06 when the
initial windows testing support was added, and has been brought along
since. It's unclear if this was needed back then - now it no longer is
needed at least, and since libc++ started depending on max_align_t, this
became an issue.

Differential Revision: https://reviews.llvm.org/D97167
  • Loading branch information
mstorsjo committed Feb 24, 2021
1 parent 075539d commit 90232b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcxx/utils/libcxx/test/config.py
Expand Up @@ -204,7 +204,7 @@ def _prefixed_env_list(var, prefix):

assert self.cxx_is_clang_cl
flags = []
compile_flags = _prefixed_env_list('INCLUDE', '-isystem')
compile_flags = []
link_flags = _prefixed_env_list('LIB', '-L')
for path in _split_env_var('LIB'):
self.add_path(self.exec_env, path)
Expand Down

0 comments on commit 90232b2

Please sign in to comment.