@@ -81,6 +81,11 @@ pub fn new_workcache_context(p: &Path) -> workcache::Context {
81
81
82
82
pub fn build_lib ( sysroot : Path , root : Path , name : ~str , version : Version ,
83
83
lib : Path ) {
84
+ build_lib_with_cfgs ( sysroot, root, name, version, lib, ~[ ] )
85
+ }
86
+
87
+ pub fn build_lib_with_cfgs ( sysroot : Path , root : Path , name : ~str ,
88
+ version : Version , lib : Path , cfgs : ~[ ~str ] ) {
84
89
let cx = default_context ( sysroot, root. clone ( ) ) ;
85
90
let pkg_src = PkgSrc {
86
91
source_workspace : root. clone ( ) ,
@@ -94,11 +99,16 @@ pub fn build_lib(sysroot: Path, root: Path, name: ~str, version: Version,
94
99
tests : ~[ ] ,
95
100
benchs : ~[ ]
96
101
} ;
97
- pkg_src. build ( & cx, ~ [ ] , [ ] ) ;
102
+ pkg_src. build ( & cx, cfgs , [ ] ) ;
98
103
}
99
104
100
105
pub fn build_exe ( sysroot : Path , root : Path , name : ~str , version : Version ,
101
106
main : Path ) {
107
+ build_exe_with_cfgs ( sysroot, root, name, version, main, ~[ ] )
108
+ }
109
+
110
+ pub fn build_exe_with_cfgs ( sysroot : Path , root : Path , name : ~str ,
111
+ version : Version , main : Path , cfgs : ~[ ~str ] ) {
102
112
let cx = default_context ( sysroot, root. clone ( ) ) ;
103
113
let pkg_src = PkgSrc {
104
114
source_workspace : root. clone ( ) ,
@@ -113,7 +123,7 @@ pub fn build_exe(sysroot: Path, root: Path, name: ~str, version: Version,
113
123
benchs : ~[ ]
114
124
} ;
115
125
116
- pkg_src. build ( & cx, ~ [ ] , [ ] ) ;
126
+ pkg_src. build ( & cx, cfgs , [ ] ) ;
117
127
}
118
128
119
129
pub fn install_pkg ( cx : & BuildContext ,
0 commit comments