Skip to content

Commit bd68568

Browse files
LaurenzValerque
authored andcommitted
Add missing cfg annotation
1 parent 860e431 commit bd68568

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/gen-shaping-tests.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,12 @@ def convert_test_folder(root_dir, hb_shape_exe, tests_dir, tests_name, custom):
204204
def convert_test_files(root_dir, hb_shape_exe, tests_dir, tests_name, files, custom):
205205
fonts = set()
206206

207+
macos_snippet = "#[cfg(target_os = \"macos\")]\n" if tests_name == "macos" else ""
208+
207209
rust_code = (
208210
"// WARNING: this file was generated by ../scripts/gen-shaping-tests.py\n"
209-
"\n"
211+
"\n" +
212+
macos_snippet +
210213
"use crate::shape;\n"
211214
"\n"
212215
)

0 commit comments

Comments
 (0)