fixes for macos, submitting to linux machine for regenerating protocols
This commit is contained in:
parent
8dabc0ffb9
commit
21171592fd
|
|
@ -45,8 +45,6 @@ pub fn configure(b: *std.Build, module: *std.Build.Module, target: std.Build.Res
|
||||||
.flags = &.{
|
.flags = &.{
|
||||||
"-std=c99",
|
"-std=c99",
|
||||||
"-fdata-sections",
|
"-fdata-sections",
|
||||||
"-include",
|
|
||||||
"private-symbols.h",
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,12 @@ def generate(root, version):
|
||||||
name = interface.attrib['name'] + '_interface'
|
name = interface.attrib['name'] + '_interface'
|
||||||
symbols.append(f'#define {name} z_uhdk_{name}')
|
symbols.append(f'#define {name} z_uhdk_{name}')
|
||||||
for mode, suffix in [('client-header', '.h'), ('private-code', '.c')]:
|
for mode, suffix in [('client-header', '.h'), ('private-code', '.c')]:
|
||||||
subprocess.run(['wayland-scanner', mode, str(xml), str(output / (('wayland-client-protocol' if xml.stem == 'wayland' and mode == 'client-header' else xml.stem) + suffix))], check=True)
|
target = output / (('wayland-client-protocol' if xml.stem == 'wayland' and mode == 'client-header' else xml.stem) + suffix)
|
||||||
|
subprocess.run(['wayland-scanner', mode, str(xml), str(target)], check=True)
|
||||||
|
if mode == 'private-code':
|
||||||
|
# Rename the descriptors before the scanner's definitions; a -include flag cannot
|
||||||
|
# name this file because Zig 0.17 build scripts cannot resolve absolute paths.
|
||||||
|
target.write_text('#include "private-symbols.h"\n' + target.read_text())
|
||||||
(output / 'private-symbols.h').write_text('\n'.join(symbols) + '\n')
|
(output / 'private-symbols.h').write_text('\n'.join(symbols) + '\n')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue