Interaction of target attribute change with modules.

Hi All,

With the change to use target attributes in the builtin headers, we are now in a weird situation where all of the requires inside lib/Headers/module.modulemap are basically useless. They are included regardless of the status of their requires. My pending patch http://reviews.llvm.org/D10423 then causes a build failure because we try to import unavailable modules; without it, we just textually include them which causes the declarations to appear to be owned by different modules than expected.

Any ideas? It seems like to keep semantic parity with the “all intrinsic headers can be brought in” when textually including, we should remove the requires.

– Sean Silva

We should keep the 'requires x86' on _Builtin_intrinsics.intel, but remove
all the subtarget 'requires' declarations from its submodules.

Yeah, that's what I meant. Obviously we don't want to be pulling in a
completely other ISA. I'll send a patch.

-- Sean Silva

Patch is up at [PATCH] Remove requires for x86 CPU features.

– Sean Silva