Skip to content

Commit 93df647

Browse files
committed
Fix CI build issue (API change in recent nightly)
1 parent 726aca4 commit 93df647

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
**/*.log
1717

1818
# Generated by GenerateFiles.py
19-
jvm-unknown-unknown.json
20-
config.toml
19+
/config.toml
20+
jvm-unknown-unknown.json

src/lib.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,13 @@ impl CodegenBackend for MyBackend {
138138

139139
// Iterate over each (file_name, bytecode) pair in the map.
140140
for (name, bytecode) in bytecode_map.into_iter() {
141-
// The key is expected to be the file name without the ".class" extension.
142-
// Append ".class" here.
143-
let file_name = format!("{}.class", name);
144-
let file_path = outputs.temp_path_ext(&file_name, None);
141+
let file_path = outputs.temp_path_ext_for_cgu(&name, ".class", None);
142+
143+
// extract the directory from the file path
144+
let dir = file_path.parent().unwrap();
145+
146+
// make the actual file path by adding {name}.class to the directory
147+
let file_path = dir.join(format!("{}.class", name));
145148

146149
// Write the bytecode to the file
147150
let mut file = std::fs::File::create(&file_path)
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../config.toml

0 commit comments

Comments
 (0)