@@ -81,6 +81,11 @@ pub fn new_workcache_context(p: &Path) -> workcache::Context {
8181
8282pub fn build_lib ( sysroot : Path , root : Path , name : ~str , version : Version ,
8383 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 ] ) {
8489 let cx = default_context ( sysroot, root. clone ( ) ) ;
8590 let pkg_src = PkgSrc {
8691 source_workspace : root. clone ( ) ,
@@ -94,11 +99,16 @@ pub fn build_lib(sysroot: Path, root: Path, name: ~str, version: Version,
9499 tests : ~[ ] ,
95100 benchs : ~[ ]
96101 } ;
97- pkg_src. build ( & cx, ~ [ ] , [ ] ) ;
102+ pkg_src. build ( & cx, cfgs , [ ] ) ;
98103}
99104
100105pub fn build_exe ( sysroot : Path , root : Path , name : ~str , version : Version ,
101106 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 ] ) {
102112 let cx = default_context ( sysroot, root. clone ( ) ) ;
103113 let pkg_src = PkgSrc {
104114 source_workspace : root. clone ( ) ,
@@ -113,7 +123,7 @@ pub fn build_exe(sysroot: Path, root: Path, name: ~str, version: Version,
113123 benchs : ~[ ]
114124 } ;
115125
116- pkg_src. build ( & cx, ~ [ ] , [ ] ) ;
126+ pkg_src. build ( & cx, cfgs , [ ] ) ;
117127}
118128
119129pub fn install_pkg ( cx : & BuildContext ,
0 commit comments