File tree 2 files changed +17
-0
lines changed
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ pub(crate) struct Features {
24
24
pub ( crate ) struct Env {
25
25
pub ( crate ) path : Option < PathBuf > ,
26
26
pub ( crate ) include_path : Option < PathBuf > ,
27
+ pub ( crate ) cplus_include_path : Option < PathBuf > ,
27
28
pub ( crate ) source_path : Option < PathBuf > ,
28
29
pub ( crate ) precompiled_bcm_o : Option < PathBuf > ,
29
30
pub ( crate ) assume_patched : bool ,
@@ -146,6 +147,7 @@ impl Env {
146
147
Self {
147
148
path : boringssl_var ( "BORING_BSSL_PATH" ) . map ( PathBuf :: from) ,
148
149
include_path : boringssl_var ( "BORING_BSSL_INCLUDE_PATH" ) . map ( PathBuf :: from) ,
150
+ cplus_include_path : boringssl_var ( "BORING_BSSL_CPLUS_INCLUDE_PATH" ) . map ( PathBuf :: from) ,
149
151
source_path : boringssl_var ( "BORING_BSSL_SOURCE_PATH" ) . map ( PathBuf :: from) ,
150
152
precompiled_bcm_o : boringssl_var ( "BORING_BSSL_PRECOMPILED_BCM_O" ) . map ( PathBuf :: from) ,
151
153
assume_patched : boringssl_var ( "BORING_BSSL_ASSUME_PATCHED" )
Original file line number Diff line number Diff line change @@ -619,8 +619,23 @@ fn link_in_precompiled_bcm_o(config: &Config) {
619
619
. unwrap ( ) ;
620
620
}
621
621
622
+ // Note: this is the entrypoint into the boring-sys build process.
622
623
fn main ( ) {
623
624
let config = Config :: from_env ( ) ;
625
+
626
+ if let Some ( ref cplus_include_path) = config. env . cplus_include_path {
627
+ println ! (
628
+ "Setting CPLUS_INCLUDE_PATH to {}" ,
629
+ cplus_include_path. display( )
630
+ ) ;
631
+ // Inject CPLUS_INCLUDE_PATH into the environment for the build.
632
+ // This must be done before we build the boring source path so that it can
633
+ // be used during that build process.
634
+ std:: env:: set_var ( "CPLUS_INCLUDE_PATH" , cplus_include_path) ;
635
+ } else {
636
+ println ! ( "Didn't set CPLUS_INCLUDE_PATH" ) ;
637
+ }
638
+
624
639
let bssl_dir = built_boring_source_path ( & config) ;
625
640
let build_path = get_boringssl_platform_output_path ( & config) ;
626
641
You can’t perform that action at this time.
0 commit comments