Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

Feed Advanced Search

Yesterday

iana added inline comments to D159064: [Modules] Make clang modules for the C standard library headers.
Mon, Oct 2, 10:33 PM · Restricted Project, Restricted Project
iana updated the diff for D159064: [Modules] Make clang modules for the C standard library headers.

Minimize the testing stdint.h

Mon, Oct 2, 10:31 PM · Restricted Project, Restricted Project

Thu, Sep 28

iana committed rG0ea3d88bdb16: [Modules] Add a flag to control builtin headers being in system modules (authored by iana).
[Modules] Add a flag to control builtin headers being in system modules
Thu, Sep 28, 11:30 AM · Restricted Project, Restricted Project
iana closed D159483: [Modules] Add a flag to control builtin headers being in system modules.
Thu, Sep 28, 11:30 AM · Restricted Project, Restricted Project

Tue, Sep 19

iana added inline comments to D159483: [Modules] Add a flag to control builtin headers being in system modules.
Tue, Sep 19, 9:49 PM · Restricted Project, Restricted Project

Mon, Sep 18

iana added inline comments to D159483: [Modules] Add a flag to control builtin headers being in system modules.
Mon, Sep 18, 10:08 PM · Restricted Project, Restricted Project
iana added a comment to D159064: [Modules] Make clang modules for the C standard library headers.

Still going through the patch and through the discussion. But wanted to ask if there are any complications in reverting this change? For libc++ we've discussed that we don't really know the perf impact of multiple small modules. So I want to make sure we aren't making decisions that make it impossible to revert the change later.

Mon, Sep 18, 10:02 PM · Restricted Project, Restricted Project

Thu, Sep 14

iana updated the diff for D159064: [Modules] Make clang modules for the C standard library headers.

Update clang/test/Modules/stddef.c: it doesn't need a different verify label for -fbuiltin-headers-in-system-modules, allow the diagnostic to suggest either definer of size_t, add another test to make sure that size_t still works when both declarations are seen

Thu, Sep 14, 10:16 PM · Restricted Project, Restricted Project
iana added inline comments to D159064: [Modules] Make clang modules for the C standard library headers.
Thu, Sep 14, 8:38 PM · Restricted Project, Restricted Project

Wed, Sep 13

iana updated the summary of D159064: [Modules] Make clang modules for the C standard library headers.
Wed, Sep 13, 12:08 AM · Restricted Project, Restricted Project
iana requested review of D159483: [Modules] Add a flag to control builtin headers being in system modules.
Wed, Sep 13, 12:07 AM · Restricted Project, Restricted Project
iana updated the summary of D159483: [Modules] Add a flag to control builtin headers being in system modules.
Wed, Sep 13, 12:07 AM · Restricted Project, Restricted Project
iana updated the diff for D159064: [Modules] Make clang modules for the C standard library headers.

Actually allow the stdarg module

Wed, Sep 13, 12:06 AM · Restricted Project, Restricted Project
iana updated the diff for D159064: [Modules] Make clang modules for the C standard library headers.

Adjust for the changes in D159483.

Wed, Sep 13, 12:03 AM · Restricted Project, Restricted Project

Tue, Sep 12

iana updated the diff for D159483: [Modules] Add a flag to control builtin headers being in system modules.

__stddef_max_align_t.h always needs a header guard, because the type merger can't handle struct's. If it has a header guard then it always needs to have a module too, even if -fbuiltin-headers-in-system-modules is passed.

Tue, Sep 12, 11:48 PM · Restricted Project, Restricted Project
iana requested changes to D158021: [clang][modules] Mark builtin header 'inttypes.h' for modules.

I was talking to Ben about this one a little today since I ended up needing to make the same -isystem/-I -> -internal-isystem switch in some of the unit tests in D159064, and also add a clang/test/Modules/Inputs/System/usr/include/inttypes.h.

Tue, Sep 12, 10:44 PM · Restricted Project, Restricted Project

Sat, Sep 9

iana updated the diff for D159064: [Modules] Make clang modules for the C standard library headers.
  • Drop the -verify off the stddef tests so that I can get the full errors
Sat, Sep 9, 12:02 PM · Restricted Project, Restricted Project
iana updated the diff for D159064: [Modules] Make clang modules for the C standard library headers.
  • Drop the -verify off the new tests so that I can get the full errors
Sat, Sep 9, 11:39 AM · Restricted Project, Restricted Project

Fri, Sep 8

iana updated the diff for D159064: [Modules] Make clang modules for the C standard library headers.

Add the header guard comment to __stddef_null.h

Fri, Sep 8, 3:23 PM · Restricted Project, Restricted Project
iana updated the diff for D159064: [Modules] Make clang modules for the C standard library headers.

Try deleting the module cache to fix the failing tests

Fri, Sep 8, 3:22 PM · Restricted Project, Restricted Project
iana added inline comments to D159064: [Modules] Make clang modules for the C standard library headers.
Fri, Sep 8, 3:16 PM · Restricted Project, Restricted Project
iana added inline comments to D159064: [Modules] Make clang modules for the C standard library headers.
Fri, Sep 8, 11:34 AM · Restricted Project, Restricted Project
iana added inline comments to D159064: [Modules] Make clang modules for the C standard library headers.
Fri, Sep 8, 11:33 AM · Restricted Project, Restricted Project
iana updated the diff for D159064: [Modules] Make clang modules for the C standard library headers.

Rebase

Fri, Sep 8, 10:05 AM · Restricted Project, Restricted Project
iana updated the diff for D159483: [Modules] Add a flag to control builtin headers being in system modules.

Rebase

Fri, Sep 8, 10:05 AM · Restricted Project, Restricted Project

Thu, Sep 7

iana updated the diff for D159064: [Modules] Make clang modules for the C standard library headers.

Rebase

Thu, Sep 7, 11:17 PM · Restricted Project, Restricted Project
iana updated the diff for D159483: [Modules] Add a flag to control builtin headers being in system modules.

Add comments to stdarg.h and stddef.h explaining their interesting header guard setup.
Ignore -fbuiltin-headers-in-system-modules if -fmodules isn't passed.
DriverKit doesn't need to pass -fbuiltin-headers-in-system-modules since it doesn't have a module map at all.
Add a test for -fbuiltin-headers-in-system-modules/__has_feature(builtin_headers_in_system_modules)
Miscellaneous review feedback

Thu, Sep 7, 11:17 PM · Restricted Project, Restricted Project
iana abandoned D155141: [libc++][Modules] Group the private detail headers into larger modules.

[Github PR transition cleanup]

I've said it before but I think this is too complicated and we don't have a clear picture of the benefits. I would prefer abandoning this patch, but if you really want to move forward with it, please provide compelling evidence of why this complexity is worth adding.

Thu, Sep 7, 10:26 PM · Restricted Project, Restricted Project
iana abandoned D140250: Define NULL in its own header.

This was succeeded by D158709.

Thu, Sep 7, 10:21 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
iana added inline comments to D159483: [Modules] Add a flag to control builtin headers being in system modules.
Thu, Sep 7, 2:57 PM · Restricted Project, Restricted Project
iana updated the diff for D159064: [Modules] Make clang modules for the C standard library headers.

Fix formatting issue

Thu, Sep 7, 2:18 PM · Restricted Project, Restricted Project
iana updated the diff for D159483: [Modules] Add a flag to control builtin headers being in system modules.

Rebase

Thu, Sep 7, 2:17 PM · Restricted Project, Restricted Project
iana updated the diff for D159483: [Modules] Add a flag to control builtin headers being in system modules.

Fix formatting

Thu, Sep 7, 2:16 PM · Restricted Project, Restricted Project
iana added a comment to D159483: [Modules] Add a flag to control builtin headers being in system modules.

How does this work today? Wouldn't the include guard prevent this?

Today they don't define their include guard when building with modules.

Thanks - I can see some headers behave that way, or in other cases there are other sorts of has_feature(modules) checks that I can see you're modifying, but what about all the *va_* headers that currently just seem to have normal header guards?

Thu, Sep 7, 1:46 PM · Restricted Project, Restricted Project
iana added inline comments to D159483: [Modules] Add a flag to control builtin headers being in system modules.
Thu, Sep 7, 1:31 PM · Restricted Project, Restricted Project
iana added a comment to D159483: [Modules] Add a flag to control builtin headers being in system modules.

but need to be repeatedly included when they're used in system modules

How does this work today? Wouldn't the include guard prevent this?

Thu, Sep 7, 1:29 PM · Restricted Project, Restricted Project
iana updated the summary of D159483: [Modules] Add a flag to control builtin headers being in system modules.
Thu, Sep 7, 1:29 PM · Restricted Project, Restricted Project
iana added inline comments to D159483: [Modules] Add a flag to control builtin headers being in system modules.
Thu, Sep 7, 1:28 PM · Restricted Project, Restricted Project
iana added a comment to D159483: [Modules] Add a flag to control builtin headers being in system modules.

A big assumption this patch makes is that ModuleMap::isBuiltinHeader is primarily to support Apple's unfortunate module needs. Thus this patch turns that behavior off by default, which makes things work the way one would expect. That is, when usr/include/module.modulemap references stdint.h, that just means usr/include/stdint.h and it doesn't also pull in the clang builtin stdint.h, it doesn't transform usr/include/stdint.h into a textual header, etc. I'm hoping that's acceptable behavior on non-Apple platforms, but if someone knows otherwise please let me know and we can rethink how the option should be defined and set.

Thu, Sep 7, 12:13 PM · Restricted Project, Restricted Project
iana added inline comments to D159064: [Modules] Make clang modules for the C standard library headers.
Thu, Sep 7, 12:06 PM · Restricted Project, Restricted Project
iana updated the summary of D159064: [Modules] Make clang modules for the C standard library headers.
Thu, Sep 7, 12:02 PM · Restricted Project, Restricted Project
iana updated the diff for D159064: [Modules] Make clang modules for the C standard library headers.

Rebase on top of D159483

Thu, Sep 7, 11:55 AM · Restricted Project, Restricted Project
iana requested review of D159483: [Modules] Add a flag to control builtin headers being in system modules.
Thu, Sep 7, 11:54 AM · Restricted Project, Restricted Project

Sep 1 2023

iana added a comment to D159064: [Modules] Make clang modules for the C standard library headers.

Ah, the tests are failing because some of them are putting the builtin headers in other modules. This is going to need the "optionally ignore the builtin modules" change first then. I almost have that one finished.

Sep 1 2023, 12:14 PM · Restricted Project, Restricted Project

Aug 31 2023

iana accepted D159312: [Headers] Remove a space in NULL define.

Can you add a comment that says the spacing is important please? Although why the heck is musl declaring NULL in stdio.h?

Aug 31 2023, 5:07 PM · Restricted Project, Restricted Project

Aug 30 2023

iana updated the diff for D159064: [Modules] Make clang modules for the C standard library headers.

Update Module::directlyUses

Aug 30 2023, 6:13 PM · Restricted Project, Restricted Project
iana updated the summary of D159064: [Modules] Make clang modules for the C standard library headers.
Aug 30 2023, 2:30 PM · Restricted Project, Restricted Project
iana updated the summary of D159064: [Modules] Make clang modules for the C standard library headers.
Aug 30 2023, 2:30 PM · Restricted Project, Restricted Project
iana updated the diff for D159064: [Modules] Make clang modules for the C standard library headers.

The nullptr_t submodule can't require c23 because it needs to be used in C++ in some cases too. Remove the requires from the module map and add a C23 guard to the header.

Aug 30 2023, 2:18 PM · Restricted Project, Restricted Project
iana added inline comments to D159064: [Modules] Make clang modules for the C standard library headers.
Aug 30 2023, 12:07 PM · Restricted Project, Restricted Project
iana committed rG680da4b5d7ec: [Headers][Modules] Make separate headers for the stdarg.h and stddef.h pieces… (authored by iana).
[Headers][Modules] Make separate headers for the stdarg.h and stddef.h pieces…
Aug 30 2023, 11:42 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
iana closed D158709: [Headers][Modules] Make separate headers for the stdarg.h and stddef.h pieces so that they can be modularized.
Aug 30 2023, 11:41 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project

Aug 29 2023

iana committed rGadb68c979d84: [clang][modules] Add a c23 module feature (authored by iana).
[clang][modules] Add a c23 module feature
Aug 29 2023, 11:11 AM · Restricted Project, Restricted Project
iana closed D159018: [clang][modules] Add a c23 module feature.
Aug 29 2023, 11:11 AM · Restricted Project, Restricted Project

Aug 28 2023

iana added inline comments to D159064: [Modules] Make clang modules for the C standard library headers.
Aug 28 2023, 11:27 PM · Restricted Project, Restricted Project
iana updated the diff for D159064: [Modules] Make clang modules for the C standard library headers.

Add @import tests for all of the new modules

Aug 28 2023, 11:26 PM · Restricted Project, Restricted Project
iana updated the diff for D159064: [Modules] Make clang modules for the C standard library headers.

Remove the module cache before running the stdarg/stddef unit tests in module mode

Aug 28 2023, 10:33 PM · Restricted Project, Restricted Project
iana requested review of D159064: [Modules] Make clang modules for the C standard library headers.
Aug 28 2023, 10:12 PM · Restricted Project, Restricted Project
iana updated the diff for D159018: [clang][modules] Add a c23 module feature.

remove the extra #endif (which oddly didn't produce an error locally so I must've ran the tests wrong the first time...)

Aug 28 2023, 9:11 PM · Restricted Project, Restricted Project
iana added a comment to D159018: [clang][modules] Add a c23 module feature.

Would we want to back port this to llvm 17?

Aug 28 2023, 2:40 PM · Restricted Project, Restricted Project
iana requested review of D159018: [clang][modules] Add a c23 module feature.
Aug 28 2023, 2:36 PM · Restricted Project, Restricted Project
iana added a comment to D158709: [Headers][Modules] Make separate headers for the stdarg.h and stddef.h pieces so that they can be modularized.

At a high-level (not just for this patch, but for the entire series): is this need specific to your downstream or is this a more general need? e.g., should this complexity be kept downstream until we've got a second platform needing it?

Aug 28 2023, 10:52 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project

Aug 25 2023

iana updated the diff for D158709: [Headers][Modules] Make separate headers for the stdarg.h and stddef.h pieces so that they can be modularized.

Modules don't support the #include #undef #include pattern to redefine macros, the second include has no effect. Move the #undef of NULL into __stddef_null.h so that the textual behavior is preserved, but the module behavior doesn't leave NULL undefined.

Aug 25 2023, 5:37 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
iana added a comment to D158709: [Headers][Modules] Make separate headers for the stdarg.h and stddef.h pieces so that they can be modularized.

I'm a bit concerned about the impact on (non-modules) build time performance. This splits stddef.h and stdarg.h into needing to open 14 different files instead of 2. Hopefully that's not a lot of overhead, but given that stddef.h is included in approximately every TU and that sometimes external forces cause files to be slow to open (network drives, AV software, etc), I think we should be cautious and measure the impact. I also really do not like how poorly this scales -- the fact that this is only needed for these two files helps a bit, but this is a lot of C++-specific hoops to jump through for C standard library headers.

Aug 25 2023, 11:11 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project

Aug 24 2023

iana updated the diff for D158709: [Headers][Modules] Make separate headers for the stdarg.h and stddef.h pieces so that they can be modularized.

Rebase

Aug 24 2023, 10:30 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
iana committed rG6021c78fe55e: [libc++][Modules] locale fails to compile with clang modules when… (authored by iana).
[libc++][Modules] locale fails to compile with clang modules when…
Aug 24 2023, 2:23 PM · Restricted Project, Restricted Project
iana closed D158669: [libc++][Modules] locale fails to compile with clang modules when _LIBCPP_LOCALE__L_EXTENSIONS is undefined.
Aug 24 2023, 2:22 PM · Restricted Project, Restricted Project
iana updated the diff for D158709: [Headers][Modules] Make separate headers for the stdarg.h and stddef.h pieces so that they can be modularized.

Fixed the failing test

Aug 24 2023, 1:26 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project
iana added inline comments to D158669: [libc++][Modules] locale fails to compile with clang modules when _LIBCPP_LOCALE__L_EXTENSIONS is undefined.
Aug 24 2023, 11:07 AM · Restricted Project, Restricted Project
iana updated the diff for D158669: [libc++][Modules] locale fails to compile with clang modules when _LIBCPP_LOCALE__L_EXTENSIONS is undefined.

Add a comment why we're including __locale because it's not obvious

Aug 24 2023, 11:06 AM · Restricted Project, Restricted Project
iana added inline comments to D158669: [libc++][Modules] locale fails to compile with clang modules when _LIBCPP_LOCALE__L_EXTENSIONS is undefined.
Aug 24 2023, 11:05 AM · Restricted Project, Restricted Project
iana updated the diff for D158669: [libc++][Modules] locale fails to compile with clang modules when _LIBCPP_LOCALE__L_EXTENSIONS is undefined.

Put the clocale include back

Aug 24 2023, 11:04 AM · Restricted Project, Restricted Project
iana requested review of D158709: [Headers][Modules] Make separate headers for the stdarg.h and stddef.h pieces so that they can be modularized.
Aug 24 2023, 12:00 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project, Restricted Project

Aug 23 2023

iana committed rG72da678d8c84: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros (authored by iana).
[Headers] Replace __need_STDDEF_H_misc with specific __need_ macros
Aug 23 2023, 11:56 PM · Restricted Project, Restricted Project
iana committed rG62f769aa82f6: [Headers] Add missing __need_ macros to stdarg.h (authored by iana).
[Headers] Add missing __need_ macros to stdarg.h
Aug 23 2023, 11:55 PM · Restricted Project, Restricted Project
iana closed D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros.
Aug 23 2023, 11:55 PM · Restricted Project, Restricted Project
iana closed D157793: [Headers] Add missing __need_ macros to stdarg.h.
Aug 23 2023, 11:55 PM · Restricted Project, Restricted Project
iana added a comment to D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros.

Windows succeeding earlier, I'm pretty confident that the current crash isn't due to this review, so I'm going to go ahead and land.

Aug 23 2023, 11:54 PM · Restricted Project, Restricted Project
iana updated the diff for D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros.

Try rebasing one more time

Aug 23 2023, 11:18 PM · Restricted Project, Restricted Project
iana updated the diff for D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros.

Rebase

Aug 23 2023, 8:45 PM · Restricted Project, Restricted Project
iana added a comment to D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros.

Also we should figure out why the Clang modules build is failing on top of this, it doesn't look like a false positive.

Where do you see that failure?

Aug 23 2023, 2:50 PM · Restricted Project, Restricted Project
iana added a comment to D158669: [libc++][Modules] locale fails to compile with clang modules when _LIBCPP_LOCALE__L_EXTENSIONS is undefined.

It looks like we don't have unit tests/CI for undef(_LIBCPP_HAS_NO_LOCALIZATION) + undef(_LIBCPP_LOCALE__L_EXTENSIONS). If anyone knows how to set that up please let me know!

Aug 23 2023, 1:55 PM · Restricted Project, Restricted Project
iana updated the summary of D158669: [libc++][Modules] locale fails to compile with clang modules when _LIBCPP_LOCALE__L_EXTENSIONS is undefined.
Aug 23 2023, 1:53 PM · Restricted Project, Restricted Project
iana requested review of D158669: [libc++][Modules] locale fails to compile with clang modules when _LIBCPP_LOCALE__L_EXTENSIONS is undefined.
Aug 23 2023, 1:53 PM · Restricted Project, Restricted Project
iana added a comment to D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros.

Also we should figure out why the Clang modules build is failing on top of this, it doesn't look like a false positive.

Aug 23 2023, 1:21 PM · Restricted Project, Restricted Project
iana added inline comments to D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros.
Aug 23 2023, 1:11 PM · Restricted Project, Restricted Project

Aug 22 2023

iana added inline comments to D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros.
Aug 22 2023, 10:27 PM · Restricted Project, Restricted Project
iana updated the diff for D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros.

Only define nullptr_t in C++ if _MSC_EXTENSIONS is defined, even if __need_nullptr_t is explicitly set.

Aug 22 2023, 10:27 PM · Restricted Project, Restricted Project
iana abandoned D158528: Backport fixes for libc++ std module generation.
Aug 22 2023, 9:36 PM · Restricted Project, Restricted Project
iana updated the diff for D158528: Backport fixes for libc++ std module generation.

Update nasty_macros.gen.py's path to header_information

Aug 22 2023, 12:25 PM · Restricted Project, Restricted Project
iana added inline comments to D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros.
Aug 22 2023, 11:33 AM · Restricted Project, Restricted Project
iana requested review of D158528: Backport fixes for libc++ std module generation.
Aug 22 2023, 10:32 AM · Restricted Project, Restricted Project

Aug 21 2023

iana added inline comments to D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros.
Aug 21 2023, 12:35 PM · Restricted Project, Restricted Project
iana added inline comments to D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros.
Aug 21 2023, 11:39 AM · Restricted Project, Restricted Project

Aug 18 2023

iana added a comment to D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros.

This is going to be really naive, but can someone explain why we need these __need_XXXXX macros? Why doesn't <stddef.h> simply always declare what it should declare? Also, does anybody understand the expected relationship between the C Standard Library headers and these Clang builtin headers? Who defines what?

Everyone I've spoken to so far about this (and myself) was extremely confused. At some point I thought these macros were only needed for compatibility with old glibcs but that wouldn't even be needed anymore, but I'm not certain.

Aug 18 2023, 4:31 PM · Restricted Project, Restricted Project

Aug 17 2023

iana committed rGa9167c2e475a: [libc++][Modules] Simplify the __std_clang_module header generation (authored by iana).
[libc++][Modules] Simplify the __std_clang_module header generation
Aug 17 2023, 10:35 PM · Restricted Project, Restricted Project
iana closed D158133: [libc++][Modules] Simplify the __std_clang_module header generation.
Aug 17 2023, 10:35 PM · Restricted Project, Restricted Project
iana updated the diff for D158133: [libc++][Modules] Simplify the __std_clang_module header generation.

Regenerate the header

Aug 17 2023, 11:31 AM · Restricted Project, Restricted Project
iana updated the diff for D158133: [libc++][Modules] Simplify the __std_clang_module header generation.

Fix the formatting

Aug 17 2023, 11:29 AM · Restricted Project, Restricted Project

Aug 16 2023

iana requested review of D158133: [libc++][Modules] Simplify the __std_clang_module header generation.
Aug 16 2023, 5:03 PM · Restricted Project, Restricted Project