gen: fix `undef`ing __has_include on macos tcc (#7057)
parent
7511d6e4e8
commit
0248e4955d
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 38dea90b2f7cdd1d1960060663bc54258606adf5
|
|
@ -306,12 +306,13 @@ pub fn (mut g Gen) init() {
|
||||||
g.cheaders.writeln(g.pref.custom_prelude)
|
g.cheaders.writeln(g.pref.custom_prelude)
|
||||||
} else if !g.pref.no_preludes {
|
} else if !g.pref.no_preludes {
|
||||||
g.cheaders.writeln('// Generated by the V compiler')
|
g.cheaders.writeln('// Generated by the V compiler')
|
||||||
g.cheaders.writeln('
|
tcc_undef_has_include := '
|
||||||
#if defined(__TINYC__) && defined(__has_include)
|
#if defined(__TINYC__) && defined(__has_include)
|
||||||
// tcc does not support has_include properly yet, turn it off completely
|
// tcc does not support has_include properly yet, turn it off completely
|
||||||
#undef __has_include
|
#undef __has_include
|
||||||
#endif
|
#endif'
|
||||||
')
|
g.cheaders.writeln(tcc_undef_has_include)
|
||||||
|
g.includes.writeln(tcc_undef_has_include)
|
||||||
g.cheaders.writeln(get_guarded_include_text('<inttypes.h>', 'The C compiler can not find <inttypes.h> . Please install build-essentials')) // int64_t etc
|
g.cheaders.writeln(get_guarded_include_text('<inttypes.h>', 'The C compiler can not find <inttypes.h> . Please install build-essentials')) // int64_t etc
|
||||||
g.cheaders.writeln(c_builtin_types)
|
g.cheaders.writeln(c_builtin_types)
|
||||||
if g.pref.is_bare {
|
if g.pref.is_bare {
|
||||||
|
|
Loading…
Reference in New Issue