mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 17:11:44 +03:00
Skip ModuleInfo generation for C files (incl. *.i)
Fixes dmd-testsuite's compilable/testcomplex.i.
This commit is contained in:
parent
30bc9c65c8
commit
49bb2ac590
3 changed files with 8 additions and 3 deletions
|
@ -433,9 +433,11 @@ void codegenModule(IRState *irs, Module *m) {
|
||||||
|
|
||||||
// Skip emission of all the additional module metadata if:
|
// Skip emission of all the additional module metadata if:
|
||||||
// a) the -betterC switch is on,
|
// a) the -betterC switch is on,
|
||||||
// b) requested explicitly by the user via pragma(LDC_no_moduleinfo), or if
|
// b) requested explicitly by the user via pragma(LDC_no_moduleinfo),
|
||||||
// c) there's no ModuleInfo declaration.
|
// c) there's no ModuleInfo declaration, or if
|
||||||
if (global.params.useModuleInfo && !m->noModuleInfo && Module::moduleinfo) {
|
// d) the module is a C file.
|
||||||
|
if (global.params.useModuleInfo && !m->noModuleInfo && Module::moduleinfo &&
|
||||||
|
m->filetype != FileType::c) {
|
||||||
// generate ModuleInfo
|
// generate ModuleInfo
|
||||||
registerModuleInfo(m);
|
registerModuleInfo(m);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
// REQUIRED_ARGS: -defaultlib=
|
||||||
|
|
||||||
# 1 "runnable/extra-files/cstuff3.c"
|
# 1 "runnable/extra-files/cstuff3.c"
|
||||||
# 1 "<built-in>"
|
# 1 "<built-in>"
|
||||||
# 1 "<command-line>"
|
# 1 "<command-line>"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* EXTRA_SOURCES: imports/imp23014.i
|
/* EXTRA_SOURCES: imports/imp23014.i
|
||||||
|
* REQUIRED_ARGS: -defaultlib=
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static _Thread_local int tmp;
|
static _Thread_local int tmp;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue