Commit Graph

5 Commits

Author SHA1 Message Date
Volodymyr Sapsai 51e79f0634 [X86] Make `x86intrin.h`, `immintrin.h` includable with `-fno-gnu-inline-asm`.
Currently `immintrin.h` includes `pconfigintrin.h` and `sgxintrin.h`
which contain inline assembly. It causes failures when building with the
flag `-fno-gnu-inline-asm`.

Fix by excluding functions with inline assembly when this extension is
disabled. So far there was no need to support `_pconfig_u32`,
`_enclu_u32`, `_encls_u32`, `_enclv_u32` on platforms that require
`-fno-gnu-inline-asm`. But if developers start using these functions,
they'll have compile-time undeclared identifier errors which is
preferrable to runtime errors.

rdar://problem/49540880

Reviewers: craig.topper, GBuella, rnk, echristo

Reviewed By: rnk

Subscribers: jkorous, dexonsmith, cfe-commits

Differential Revision: https://reviews.llvm.org/D61621

llvm-svn: 360630
2019-05-13 22:40:11 +00:00
Elad Cohen 938f516424 [Modules] Add a command line option for loading the clang builtins modulemap.
-fbuiltin-module-map loads the clang builtins modulemap file. (This is
equivalent to -fmodule-map-file=<resource dir>/include/module.modulemap)

Differential Revision: https://reviews.llvm.org/D25767

llvm-svn: 285548
2016-10-31 08:21:54 +00:00
NAKAMURA Takumi f852ac88f3 clang/test/Modules/compiler_builtins_x86.c: Fix r280658.
llvm-svn: 280659
2016-09-05 13:14:54 +00:00
James Molloy 3ddbb81ea0 Attempt to fix buildbots not targetting x86
r280613 introduced failures for all builds that don't target x86 by default. Add an explicit target to avoid a missing feature diagnostic.

llvm-svn: 280658
2016-09-05 12:28:49 +00:00
Elad Cohen fb6358d2b5 [Modules] Add 'freestanding' to the 'requires-declaration' feature-list.
This adds support for modules that require (non-)freestanding
environment, such as the compiler builtin mm_malloc submodule.

Differential Revision: https://reviews.llvm.org/D23871

llvm-svn: 280613
2016-09-04 06:00:42 +00:00