File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ pub(crate) struct Features {
2424pub ( crate ) struct Env {
2525 pub ( crate ) path : Option < PathBuf > ,
2626 pub ( crate ) include_path : Option < PathBuf > ,
27+ pub ( crate ) cplus_include_path : Option < PathBuf > ,
2728 pub ( crate ) source_path : Option < PathBuf > ,
2829 pub ( crate ) precompiled_bcm_o : Option < PathBuf > ,
2930 pub ( crate ) assume_patched : bool ,
@@ -146,6 +147,7 @@ impl Env {
146147 Self {
147148 path : boringssl_var ( "BORING_BSSL_PATH" ) . map ( PathBuf :: from) ,
148149 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) ,
149151 source_path : boringssl_var ( "BORING_BSSL_SOURCE_PATH" ) . map ( PathBuf :: from) ,
150152 precompiled_bcm_o : boringssl_var ( "BORING_BSSL_PRECOMPILED_BCM_O" ) . map ( PathBuf :: from) ,
151153 assume_patched : boringssl_var ( "BORING_BSSL_ASSUME_PATCHED" )
Original file line number Diff line number Diff line change @@ -619,8 +619,20 @@ fn link_in_precompiled_bcm_o(config: &Config) {
619619 . unwrap ( ) ;
620620}
621621
622+ // Note: this is the entrypoint into the boring-sys build process.
622623fn main ( ) {
623624 let config = Config :: from_env ( ) ;
625+
626+ if let Some ( ref cplus_include_path) = config. env . cplus_include_path {
627+ println ! ( "Setting CPLUS_INCLUDE_PATH to {}" , cplus_include_path) ;
628+ // Inject CPLUS_INCLUDE_PATH into the environment for the build.
629+ // This must be done before we build the boring source path so that it can
630+ // be used during that build process.
631+ std:: env:: set_var ( "CPLUS_INCLUDE_PATH" , cplus_include_path) ;
632+ } else {
633+ println ! ( "Didn't set CPLUS_INCLUDE_PATH" ) ;
634+ }
635+
624636 let bssl_dir = built_boring_source_path ( & config) ;
625637 let build_path = get_boringssl_platform_output_path ( & config) ;
626638
You can’t perform that action at this time.
0 commit comments