mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: conditional guard for platform specific #includes directives in _xxx.v files.
This commit is contained in:

committed by
Alexander Medvednikov

parent
59a4c923c4
commit
0379b9cc69
@ -164,6 +164,11 @@ fn (p mut Parser) chash() {
|
||||
}
|
||||
if hash.starts_with('include') {
|
||||
if p.first_pass() && !is_sig {
|
||||
if p.file_pcguard.len != 0 {
|
||||
//println('p: $p.file_platform $p.file_pcguard')
|
||||
p.cgen.includes << '$p.file_pcguard\n#$hash\n#endif'
|
||||
return
|
||||
}
|
||||
p.cgen.includes << '#$hash'
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user