This means that arguments set via `add_global_arguments`, `add_project_arguments` and by either the `-Dc_args` or `CFLAGS` are applied to bindgen as well. This can be important when, among other things, #defines are set via these mechanisms. Fixes: #12065pull/12289/head
parent
c1ac252f4f
commit
d5546bdcea
6 changed files with 57 additions and 1 deletions
@ -0,0 +1,10 @@ |
|||||||
|
#ifndef GLOBAL_ARG |
||||||
|
char * success(void); |
||||||
|
#endif |
||||||
|
#ifndef PROJECT_ARG |
||||||
|
char * success(void); |
||||||
|
#endif |
||||||
|
#ifndef CMD_ARG |
||||||
|
char * success(void); |
||||||
|
#endif |
||||||
|
int success(void); |
@ -0,0 +1,5 @@ |
|||||||
|
#include "src/global-project.h" |
||||||
|
|
||||||
|
int success(void) { |
||||||
|
return 0; |
||||||
|
} |
@ -0,0 +1,14 @@ |
|||||||
|
// SPDX-license-identifer: Apache-2.0
|
||||||
|
// Copyright © 2023 Intel Corporation
|
||||||
|
|
||||||
|
#![allow(non_upper_case_globals)] |
||||||
|
#![allow(non_camel_case_types)] |
||||||
|
#![allow(non_snake_case)] |
||||||
|
|
||||||
|
include!("global-project.rs"); |
||||||
|
|
||||||
|
fn main() { |
||||||
|
unsafe { |
||||||
|
std::process::exit(success()); |
||||||
|
}; |
||||||
|
} |
@ -1,7 +1,10 @@ |
|||||||
{ |
{ |
||||||
|
"env": { |
||||||
|
"CFLAGS": "-DCMD_ARG" |
||||||
|
}, |
||||||
"stdout": [ |
"stdout": [ |
||||||
{ |
{ |
||||||
"line": "test cases/rust/12 bindgen/meson.build:27: WARNING: Project targets '>= 0.63' but uses feature introduced in '1.0.0': \"rust.bindgen\" keyword argument \"include_directories\" of type array[str]." |
"line": "test cases/rust/12 bindgen/meson.build:30: WARNING: Project targets '>= 0.63' but uses feature introduced in '1.0.0': \"rust.bindgen\" keyword argument \"include_directories\" of type array[str]." |
||||||
} |
} |
||||||
] |
] |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue