str-graphemes: rework and add some zig tests

- rework strGraphemes() to use a mutable slice and keep track of just
`last_codepoint_len`.
- add zig tests for empty string, ascii, utf8, ascii+utf8+emoji
This commit is contained in:
Travis Staloch 2022-10-19 09:16:12 -07:00
parent df7e4eea7e
commit c2dbed2ff5
No known key found for this signature in database
GPG key ID: 9726F5C64475E635
4 changed files with 65 additions and 80 deletions

View file

@ -434,7 +434,12 @@ pub fn build_c_host_native(
_ => {
command.args(&[
shared_lib_path.to_str().unwrap(),
&bitcode::get_builtins_host_obj_path(),
// This line is commented out because
// @bhansconnect: With the addition of Str.graphemes, always
// linking the built-ins led to a surgical linker bug for
// optimized builds. Disabling until it is needed for dev
// builds.
// &bitcode::get_builtins_host_obj_path(),
"-fPIE",
"-pie",
"-lm",