File tree Expand file tree Collapse file tree 2 files changed +17
-13
lines changed
Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 6363 - name : Build Windows
6464 if : matrix.os == 'windows'
6565 env :
66- RUSTFLAGS : -Clto=fat -Cembed-bitcode=true -Clinker=lld-link
66+ MOZ_LTO : full
67+ CFLAGS : /clang:-flto
68+ CPPFLAGS : " /clang:-flto"
69+ RUSTFLAGS : -Clinker-plugin-lto -Clinker=lld-link
6770 run : |
6871 just build-release -v --target $env:TARGET
6972 Rename-Item -Path .\target\$env:TARGET\release\cli.exe -NewName spiderfire.exe
7881 if : matrix.os == 'linux'
7982 env :
8083 MOZ_LTO : full
81- CFLAGS : -flto -fuse-ld=lld
82- CXXFLAGS : -flto -fuse-ld=lld
84+ CFLAGS : -flto
85+ CPPFLAGS : -flto
86+ CXXFLAGS : -flto
8387 LDFLAGS : -fuse-ld=lld
8488 RUSTFLAGS : -Clinker-plugin-lto -Clinker=clang -Clink-arg=-fuse-ld=lld
8589 run : |
Original file line number Diff line number Diff line change @@ -20,38 +20,38 @@ use runtime::promise::future_to_promise;
2020
2121fn check_exists ( path : & Path ) -> Result < ( ) > {
2222 if path. exists ( ) {
23+ Ok ( ( ) )
24+ } else {
2325 Err ( Error :: new (
2426 format ! ( "Path {} does not exist" , path. to_str( ) . unwrap( ) ) ,
2527 None ,
2628 ) )
27- } else {
28- Ok ( ( ) )
2929 }
3030}
3131
3232fn check_not_exists ( path : & Path ) -> Result < ( ) > {
3333 if !path. exists ( ) {
34- Err ( Error :: new ( format ! ( "Path {} exist" , path. to_str( ) . unwrap( ) ) , None ) )
35- } else {
3634 Ok ( ( ) )
35+ } else {
36+ Err ( Error :: new ( format ! ( "Path {} exists" , path. to_str( ) . unwrap( ) ) , None ) )
3737 }
3838}
3939
4040fn check_is_file ( path : & Path ) -> Result < ( ) > {
4141 check_exists ( path) ?;
4242 if path. is_file ( ) {
43+ Ok ( ( ) )
44+ } else {
4345 Err ( Error :: new (
4446 format ! ( "Path {} is not a file" , path. to_str( ) . unwrap( ) ) ,
4547 None ,
4648 ) )
47- } else {
48- Ok ( ( ) )
4949 }
5050}
5151
5252fn check_is_not_file ( path : & Path ) -> Result < ( ) > {
5353 check_exists ( path) ?;
54- if ! path. is_file ( ) {
54+ if path. is_file ( ) {
5555 Err ( Error :: new ( format ! ( "Path {} is a file" , path. to_str( ) . unwrap( ) ) , None ) )
5656 } else {
5757 Ok ( ( ) )
@@ -61,18 +61,18 @@ fn check_is_not_file(path: &Path) -> Result<()> {
6161fn check_is_dir ( path : & Path ) -> Result < ( ) > {
6262 check_exists ( path) ?;
6363 if path. is_dir ( ) {
64+ Ok ( ( ) )
65+ } else {
6466 Err ( Error :: new (
6567 format ! ( "Path {} is not a directory" , path. to_str( ) . unwrap( ) ) ,
6668 None ,
6769 ) )
68- } else {
69- Ok ( ( ) )
7070 }
7171}
7272
7373fn check_is_not_dir ( path : & Path ) -> Result < ( ) > {
7474 check_exists ( path) ?;
75- if ! path. is_dir ( ) {
75+ if path. is_dir ( ) {
7676 Err ( Error :: new (
7777 format ! ( "Path {} is a directory" , path. to_str( ) . unwrap( ) ) ,
7878 None ,
You can’t perform that action at this time.
0 commit comments