Browse Source

zig update

Jonathan Marler 3 years ago
parent
commit
258314d3ae
5 changed files with 30 additions and 39 deletions
  1. 2 2
      .github/workflows/artifact.yml
  2. 1 1
      ziget-build-files-copy/build.zig
  3. 1 1
      ziget-build-files-copy/iguanasha
  4. 1 1
      zigetsha
  5. 25 34
      zigup.zig

+ 2 - 2
.github/workflows/artifact.yml

@@ -11,11 +11,11 @@ jobs:
       - uses: actions/checkout@v2
       - uses: goto-bus-stop/setup-zig@v1
         with:
-          version: 0.9.0-dev.856+dd7530256
+          version: 0.9.0-dev.927+eb5e4ac49
       - run: |
           git clone https://github.com/marler8997/ziget ./dep/ziget
           git -C ./dep/ziget checkout $(cat zigetsha) -b for_zigup
-          git clone https://github.com/alexnask/iguanaTLS ./dep/iguanaTLS
+          git clone https://github.com/marler8997/iguanaTLS ./dep/iguanaTLS
           git -C ./dep/iguanaTLS checkout $(cat ziget-build-files-copy/iguanasha) -b for_ziget
           zig build test -Diguana -Dcpu=baseline
         shell: bash

+ 1 - 1
ziget-build-files-copy/build.zig

@@ -213,7 +213,7 @@ pub fn addSslBackend(step: *std.build.LibExeObjStep, backend: SslBackend, ziget_
         },
         .iguana => {
             const iguana_index_file = try (GitRepo {
-                .url = "https://github.com/alexnask/iguanaTLS",
+                .url = "https://github.com/marler8997/iguanaTLS",
                 .branch = null,
                 .sha = @embedFile("iguanasha"),
             }).resolveOneFile(b.allocator, "src" ++ std.fs.path.sep_str ++ "main.zig");

+ 1 - 1
ziget-build-files-copy/iguanasha

@@ -1 +1 @@
-0d39a361639ad5469f8e4dcdaea35446bbe54b48
+ea3ee83dd816f815cedcb67e4896ade701038b90

+ 1 - 1
zigetsha

@@ -1 +1 @@
-82be2b061bf708cd4861e32dba1c00e7ba4dff0f
+85f25dcdd107c9dcabd525aa5c9e2ccd0e163f76

+ 25 - 34
zigup.zig

@@ -27,31 +27,31 @@ const archive_ext = if (builtin.os.tag == .windows) "zip" else "tar.xz";
 var global_optional_install_dir: ?[]const u8 = null;
 var global_optional_path_link: ?[]const u8 = null;
 
-fn find_zigs(allocator: *Allocator) !?[][]u8 {
-    // don't worry about free for now, this is a short lived program
-
-    if (builtin.os.tag == .windows) {
-        @panic("windows not implemented");
-        //const result = try runGetOutput(allocator, .{"where", "-a", "zig"});
-    } else {
-        const which_result = try cmdlinetool.runGetOutput(allocator, .{ "which", "zig" });
-        if (runutil.runFailed(&which_result)) {
-            return null;
-        }
-        if (which_result.stderr.len > 0) {
-            std.debug.print("which command failed with:\n{s}\n", .{which_result.stderr});
-            std.os.exit(1);
-        }
-        std.debug.print("which output:\n{s}\n", .{which_result.stdout});
-        {
-            var i = std.mem.split(which_result.stdout, "\n");
-            while (i.next()) |dir| {
-                std.debug.print("path '{s}'\n", .{dir});
-            }
-        }
-    }
-    @panic("not impl");
-}
+//fn find_zigs(allocator: *Allocator) !?[][]u8 {
+//    // don't worry about free for now, this is a short lived program
+//
+//    if (builtin.os.tag == .windows) {
+//        @panic("windows not implemented");
+//        //const result = try runGetOutput(allocator, .{"where", "-a", "zig"});
+//    } else {
+//        const which_result = try cmdlinetool.runGetOutput(allocator, .{ "which", "zig" });
+//        if (runutil.runFailed(&which_result)) {
+//            return null;
+//        }
+//        if (which_result.stderr.len > 0) {
+//            std.debug.print("which command failed with:\n{s}\n", .{which_result.stderr});
+//            std.os.exit(1);
+//        }
+//        std.debug.print("which output:\n{s}\n", .{which_result.stdout});
+//        {
+//            var i = std.mem.split(which_result.stdout, "\n");
+//            while (i.next()) |dir| {
+//                std.debug.print("path '{s}'\n", .{dir});
+//            }
+//        }
+//    }
+//    @panic("not impl");
+//}
 
 fn download(allocator: *Allocator, url: []const u8, writer: anytype) !void {
     var download_options = ziget.request.DownloadOptions{
@@ -736,15 +736,6 @@ pub fn getCommandStringLength(argv: []const []const u8) usize {
     return len;
 }
 
-pub fn appendCommandString(appender: *appendlib.Appender(u8), argv: []const []const u8) void {
-    var prefix: []const u8 = "";
-    for (argv) |arg| {
-        appender.appendSlice(prefix);
-        appender.appendSlice(arg);
-        prefix = " ";
-    }
-}
-
 pub fn getKeepReason(master_points_to_opt: ?[]const u8, default_compiler_opt: ?[]const u8, name: []const u8) ?[]const u8 {
     if (default_compiler_opt) |default_comp| {
         if (mem.eql(u8, default_comp, name)) {