@@ -235,7 +235,7 @@ pub fn build(b: *std.Build) !void {
235235 },
236236 2 = > {
237237 // Untagged development build (e.g. 0.10.0-dev.2025+ecf0050a9).
238- var it = mem .split (u8 , git_describe , "-" );
238+ var it = mem .splitScalar (u8 , git_describe , '-' );
239239 const tagged_ancestor = it .first ();
240240 const commit_height = it .next ().? ;
241241 const commit_id = it .next ().? ;
@@ -280,7 +280,7 @@ pub fn build(b: *std.Build) !void {
280280 // That means we also have to rely on stage1 compiled c++ files. We parse config.h to find
281281 // the information passed on to us from cmake.
282282 if (cfg .cmake_prefix_path .len > 0 ) {
283- var it = mem .tokenize (u8 , cfg .cmake_prefix_path , ";" );
283+ var it = mem .tokenizeScalar (u8 , cfg .cmake_prefix_path , ';' );
284284 while (it .next ()) | path | {
285285 b .addSearchPrefix (path );
286286 }
@@ -682,7 +682,7 @@ fn addCxxKnownPath(
682682 if (! std .process .can_spawn )
683683 return error .RequiredLibraryNotFound ;
684684 const path_padded = b .exec (&.{ ctx .cxx_compiler , b .fmt ("-print-file-name={s}" , .{objname }) });
685- var tokenizer = mem .tokenize (u8 , path_padded , "\r \n " );
685+ var tokenizer = mem .tokenizeAny (u8 , path_padded , "\r \n " );
686686 const path_unpadded = tokenizer .next ().? ;
687687 if (mem .eql (u8 , path_unpadded , objname )) {
688688 if (errtxt ) | msg | {
@@ -705,7 +705,7 @@ fn addCxxKnownPath(
705705}
706706
707707fn addCMakeLibraryList (exe : * std.Build.Step.Compile , list : []const u8 ) void {
708- var it = mem .tokenize (u8 , list , ";" );
708+ var it = mem .tokenizeScalar (u8 , list , ';' );
709709 while (it .next ()) | lib | {
710710 if (mem .startsWith (u8 , lib , "-l" )) {
711711 exe .linkSystemLibrary (lib ["-l" .len .. ]);
@@ -850,18 +850,18 @@ fn parseConfigH(b: *std.Build, config_h_text: []const u8) ?CMakeConfig {
850850 // .prefix = ZIG_LLVM_LINK_MODE parsed manually below
851851 };
852852
853- var lines_it = mem .tokenize (u8 , config_h_text , "\r \n " );
853+ var lines_it = mem .tokenizeAny (u8 , config_h_text , "\r \n " );
854854 while (lines_it .next ()) | line | {
855855 inline for (mappings ) | mapping | {
856856 if (mem .startsWith (u8 , line , mapping .prefix )) {
857- var it = mem .split (u8 , line , " \" " );
857+ var it = mem .splitScalar (u8 , line , '"' );
858858 _ = it .first (); // skip the stuff before the quote
859859 const quoted = it .next ().? ; // the stuff inside the quote
860860 @field (ctx , mapping .field ) = toNativePathSep (b , quoted );
861861 }
862862 }
863863 if (mem .startsWith (u8 , line , "#define ZIG_LLVM_LINK_MODE " )) {
864- var it = mem .split (u8 , line , " \" " );
864+ var it = mem .splitScalar (u8 , line , '"' );
865865 _ = it .next ().? ; // skip the stuff before the quote
866866 const quoted = it .next ().? ; // the stuff inside the quote
867867 ctx .llvm_linkage = if (mem .eql (u8 , quoted , "shared" )) .dynamic else .static ;
0 commit comments