Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.

Commit 7e427ff

Browse files
authored
Switch from RUST_TARGET_PATH to passing an absolute path to --target (#50)
1 parent efdb5e8 commit 7e427ff

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ cd hello-world
1616
3. Build the static object with cargo xbuild, pointing it at our custom target
1717

1818
```
19-
RUST_TARGET_PATH=$(pwd)/.. cargo xbuild --target x86_64-linux-kernel-module
20-
19+
cargo xbuild --target $(pwd)/../x86_64-linux-kernel-module.json
2120
```
2221

2322
4. Build the kernel module using the Linux kernel build system (kbuild)

tests/run_tests.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@ def main():
2626

2727
print("+ [{}]".format(path))
2828
run(
29-
"cargo", "xbuild", "--target", "x86_64-linux-kernel-module",
29+
"cargo", "xbuild",
30+
"--target",
31+
os.path.join(
32+
BASE_DIR, os.path.pardir, "x86_64-linux-kernel-module.json"
33+
),
3034
cwd=os.path.join(BASE_DIR, path),
3135
environ=dict(
3236
os.environ,
33-
RUST_TARGET_PATH=os.path.join(BASE_DIR, os.path.pardir),
3437
RUSTFLAGS="-Dwarnings",
3538
CARGO_TARGET_DIR=os.path.relpath(
3639
os.path.join(BASE_DIR, "target"),

0 commit comments

Comments
 (0)