aboutsummaryrefslogtreecommitdiff
path: root/std/build.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-02-04 15:24:06 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-02-04 15:24:06 -0500
commit67bd45f0cf1b452cf8de5a016bc6ff2f85393d70 (patch)
tree2c3da09e586d0fd21f81bbe66148db490e23762f /std/build.zig
parentf44ce7836a2f1d29e4f4718d45d6dca3c44ed919 (diff)
downloadzig-67bd45f0cf1b452cf8de5a016bc6ff2f85393d70.tar.gz
zig-67bd45f0cf1b452cf8de5a016bc6ff2f85393d70.zip
adjustments to std.mem split / separate
* rename std.mem.split to std.mem.tokenize * add future deprecation notice to docs * (unrelated) add note to std.os.path.resolve docs * std.mem.separate - assert delimiter.len not zero * fix implementation of std.mem.separate to respect the delimiter * separate the two iterators to different structs
Diffstat (limited to 'std/build.zig')
-rw-r--r--std/build.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/std/build.zig b/std/build.zig
index 6f58594190..5246d97339 100644
--- a/std/build.zig
+++ b/std/build.zig
@@ -324,7 +324,7 @@ pub const Builder = struct {
fn processNixOSEnvVars(self: *Builder) void {
if (os.getEnvVarOwned(self.allocator, "NIX_CFLAGS_COMPILE")) |nix_cflags_compile| {
- var it = mem.split(nix_cflags_compile, " ");
+ var it = mem.tokenize(nix_cflags_compile, " ");
while (true) {
const word = it.next() orelse break;
if (mem.eql(u8, word, "-isystem")) {
@@ -342,7 +342,7 @@ pub const Builder = struct {
assert(err == error.EnvironmentVariableNotFound);
}
if (os.getEnvVarOwned(self.allocator, "NIX_LDFLAGS")) |nix_ldflags| {
- var it = mem.split(nix_ldflags, " ");
+ var it = mem.tokenize(nix_ldflags, " ");
while (true) {
const word = it.next() orelse break;
if (mem.eql(u8, word, "-rpath")) {
@@ -689,7 +689,7 @@ pub const Builder = struct {
if (os.path.isAbsolute(name)) {
return name;
}
- var it = mem.split(PATH, []u8{os.path.delimiter});
+ var it = mem.tokenize(PATH, []u8{os.path.delimiter});
while (it.next()) |path| {
const full_path = try os.path.join(self.allocator, path, self.fmt("{}{}", name, exe_extension));
if (os.path.real(self.allocator, full_path)) |real_path| {