summaryrefslogtreecommitdiffstats
path: root/third_party/rust/winapi-build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /third_party/rust/winapi-build
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/winapi-build')
-rw-r--r--third_party/rust/winapi-build/.cargo-checksum.json1
-rw-r--r--third_party/rust/winapi-build/Cargo.toml11
-rw-r--r--third_party/rust/winapi-build/src/lib.rs14
3 files changed, 26 insertions, 0 deletions
diff --git a/third_party/rust/winapi-build/.cargo-checksum.json b/third_party/rust/winapi-build/.cargo-checksum.json
new file mode 100644
index 0000000000..4d5fc4c7ad
--- /dev/null
+++ b/third_party/rust/winapi-build/.cargo-checksum.json
@@ -0,0 +1 @@
+{"files":{"Cargo.toml":"982633c62ba05c95429b1768896a54c9a032a40fbd1e11049a9b087e9fd89176","src/lib.rs":"1d88932534b784973d3d87ac18cd8f2a0294ce5166cf30488c68ca90443e1750"},"package":"2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"} \ No newline at end of file
diff --git a/third_party/rust/winapi-build/Cargo.toml b/third_party/rust/winapi-build/Cargo.toml
new file mode 100644
index 0000000000..e1be0b184d
--- /dev/null
+++ b/third_party/rust/winapi-build/Cargo.toml
@@ -0,0 +1,11 @@
+[package]
+name = "winapi-build"
+version = "0.1.1"
+authors = ["Peter Atashian <retep998@gmail.com>"]
+description = "Common code for build.rs in WinAPI -sys crates."
+repository = "https://github.com/retep998/winapi-rs"
+keywords = ["Windows", "FFI", "WinSDK"]
+license = "MIT"
+
+[lib]
+name = "build"
diff --git a/third_party/rust/winapi-build/src/lib.rs b/third_party/rust/winapi-build/src/lib.rs
new file mode 100644
index 0000000000..fab0c6cdc5
--- /dev/null
+++ b/third_party/rust/winapi-build/src/lib.rs
@@ -0,0 +1,14 @@
+// Copyright © 2015, Peter Atashian
+// Licensed under the MIT License <LICENSE.md>
+pub fn link(name: &str, bundled: bool) {
+ use std::env::var;
+ let target = var("TARGET").unwrap();
+ let target: Vec<_> = target.split('-').collect();
+ if target.get(2) == Some(&"windows") {
+ println!("cargo:rustc-link-lib=dylib={}", name);
+ if bundled && target.get(3) == Some(&"gnu") {
+ let dir = var("CARGO_MANIFEST_DIR").unwrap();
+ println!("cargo:rustc-link-search=native={}/{}", dir, target[0]);
+ }
+ }
+}