[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2023-09-16 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. We should take a decision on this before the move off Phab. Generally the changes look sensible to me so I'm not sure there are blockers left Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137043/new/ https://reviews.llvm.

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-12-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In GCC, a `*-linux*` triple (this applies to musl as well) gets `c_target_objs="${c_target_objs} glibc-c.o"` from `gcc/config.gcc`. `"stdc-predef.h"` is defined in `glibc-c.cc`. There is no `musl-c.cc`. Even if musl does provide `stdc-predef.h` and GCC configured on `*-li

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-12-01 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I unfortunately am equally not informed enough to help here. The code itself looks fine to me, but I'm unable to make a value judgement on the change itself. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137043/new/ ht

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-11-30 Thread Tao Liang via Phabricator via cfe-commits
Origami404 marked 7 inline comments as done. Origami404 added inline comments. Comment at: clang/test/Driver/stdc-predef.c:33-34 + +// This behavior should appear in all languages that use the c preprocessor, +// including C, C++ and Objective-C, as long as the system uses musl.

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-11-30 Thread Tao Liang via Phabricator via cfe-commits
Origami404 updated this revision to Diff 478977. Origami404 added a comment. Improved comments and release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137043/new/ https://reviews.llvm.org/D137043 Files: clang/docs/ReleaseNotes.rst clan

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman edited reviewers, added: clang-vendors; removed: mibintc. aaron.ballman added a comment. (Removed @mibintc because she retired, added clang-vendors because this can impact other downstreams.) This is outside my wheelhouse, so I don't have many technical comments to add. I'm hoping

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-11-23 Thread Tao Liang via Phabricator via cfe-commits
Origami404 updated this revision to Diff 477453. Origami404 added a comment. Change implements according reviews. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137043/new/ https://reviews.llvm.org/D137043 Files: clang/docs/ReleaseNotes.rst cla

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-11-20 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D137043#3935526 , @Origami404 wrote: > In D137043#3935129 , @aaronpuchert > wrote: > >> This include-if-exists mechanism seems brittle to me. > > Do you mean the way that we used

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-11-17 Thread Tao Liang via Phabricator via cfe-commits
Origami404 added a comment. In D137043#3935129 , @aaronpuchert wrote: > This include-if-exists mechanism seems brittle to me. Do you mean the way that we used to test a file and include it (inserting `#if __has_include`) is brittle or compilation flags

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-11-17 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. This include-if-exists mechanism seems brittle to me. Can we not make it dependent on the triple, i.e. include the file if we're using a libc implementation that's known to provide (and require) this file? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-11-17 Thread Michał Górny via Phabricator via cfe-commits
mgorny resigned from this revision. mgorny added a reviewer: MaskRay. mgorny added a comment. Herald added a subscriber: StephenFan. I'm afraid this is above my skills. Maybe @MaskRay? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137043/new/ https

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-11-17 Thread Tao Liang via Phabricator via cfe-commits
Origami404 added a comment. ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137043/new/ https://reviews.llvm.org/D137043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-10-31 Thread Tao Liang via Phabricator via cfe-commits
Origami404 added a comment. After digging more deeply into tests, I found that if we decide to make clang include `stdc-predef.h` or other things, the behavior of many libtooling-related tools (e.g. clang-tidy, clangd, and python binding) will be affected. For example, `clang-tidy/checkers/cpp

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-10-30 Thread Tao Liang via Phabricator via cfe-commits
Origami404 updated this revision to Diff 471865. Origami404 added a comment. I'm sorry that my patch can not pass the CI test, but I can not reproduce the CI failure loaclly, including clang-format related problems. On my machine, `ninja check-clang` shows: [0/1] Running the Clang regression t

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-10-30 Thread Sam James via Phabricator via cfe-commits
thesamesam added a comment. Thanks for the CC. Yep, I had the same adventure with libedit and was very confused for a moment until we dug into it and realised: https://bugs.gentoo.org/870001. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137043/ne

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-10-30 Thread YingChi Long via Phabricator via cfe-commits
inclyc added a comment. > That is OK for glibc system because glibc includes this file manually. But > with other libc (e.g. musl), which does not manually include this, clang will > fail but GCC can get it compiled. FWIW currently we cannot build libedit using clang on x86_64-unknown-linux-mus

[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

2022-10-30 Thread Tao Liang via Phabricator via cfe-commits
Origami404 created this revision. Herald added a project: All. Origami404 added reviewers: aaron.ballman, erichkeane, mgorny, jyknight, mibintc, clang-language-wg. Origami404 published this revision for review. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. On GNU/