Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(543)

Side by Side Diff: mojo/public/rust/build.rs

Issue 2213563002: Rust: Add encoder/decoder tests (Closed) Base URL: git@github.com:domokit/mojo.git@decoding
Patch Set: Test with changes Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | mojo/public/rust/tests/encoding.rs » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 //! This build.rs generates some parameters for Cargo which are necessary to bui ld. 5 //! This build.rs generates some parameters for Cargo which are necessary to bui ld.
6 //! Particularly, it searches for libsystem_thunks.a. 6 //! Particularly, it searches for libsystem_thunks.a.
7 7
8 use std::env; 8 use std::env;
9 use std::ffi::OsStr; 9 use std::ffi::OsStr;
10 use std::fs; 10 use std::fs;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 if mojo_out_dir.is_dir() { 49 if mojo_out_dir.is_dir() {
50 if !embed { 50 if !embed {
51 match search_output(mojo_out_dir, OsStr::new("libsystem_thunks.a")) { 51 match search_output(mojo_out_dir, OsStr::new("libsystem_thunks.a")) {
52 Some(path) => { 52 Some(path) => {
53 println!("cargo:rustc-link-lib=static=system_thunks"); 53 println!("cargo:rustc-link-lib=static=system_thunks");
54 println!("cargo:rustc-link-search=native={}", path.display() ); 54 println!("cargo:rustc-link-search=native={}", path.display() );
55 } 55 }
56 None => panic!("Failed to find system_thunks."), 56 None => panic!("Failed to find system_thunks."),
57 } 57 }
58 } else { 58 } else {
59 println!("cargo:rustc-link-lib=stdc++");
60 match search_output(mojo_out_dir, OsStr::new("libvalidation_parser.a ")) {
61 Some(path) => {
62 println!("cargo:rustc-link-lib=static=validation_parser");
63 println!("cargo:rustc-link-search=native={}", path.display() );
64 }
65 None => panic!("Failed to find validation_parser."),
66 }
59 match search_output(mojo_out_dir, OsStr::new("librust_embedder.a")) { 67 match search_output(mojo_out_dir, OsStr::new("librust_embedder.a")) {
60 Some(path) => { 68 Some(path) => {
61 println!("cargo:rustc-link-lib=stdc++");
62 println!("cargo:rustc-link-lib=static=rust_embedder"); 69 println!("cargo:rustc-link-lib=static=rust_embedder");
63 println!("cargo:rustc-link-search=native={}", path.display() ); 70 println!("cargo:rustc-link-search=native={}", path.display() );
64 } 71 }
65 None => panic!("Failed to find rust_embedder."), 72 None => panic!("Failed to find rust_embedder."),
66 } 73 }
67 } 74 }
68 } else { 75 } else {
69 panic!("MOJO_OUT_DIR is not a valid directory."); 76 panic!("MOJO_OUT_DIR is not a valid directory.");
70 } 77 }
71 } 78 }
OLDNEW
« no previous file with comments | « no previous file | mojo/public/rust/tests/encoding.rs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698