This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
pub fn main() !void { | |
try one(); | |
} | |
fn one() !void { | |
try two(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn main() void { | |
const user_config_dir = "/tmp/foo"; | |
// 1. swap out the `*c` notation: `[*c]u8` -> `[*:0]u8` | |
// 2. add const to indicate these aren't mutable: `[*:0]u8` -> `[*:0]const u8` | |
// 3. add `?` to indicate the item (null-term string) is optional: `[*:0]const u8` → `?[*:0]const u8` | |
var search0: [2]?[*:0]const u8 = [2]?[*:0]const u8{ | |
user_config_dir, | |
null, | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit a43d026ff7be87ddb74fb463df37c864fbcbe8c4 | |
Author: Michael Dusan <[email protected]> | |
Date: Sat Dec 10 09:03:54 2022 -0500 | |
std: fix deflate tests to not use openDirAbsolute | |
This was tripping assert because path was relative. | |
diff --git a/lib/std/compress/deflate/compressor_test.zig b/lib/std/compress/deflate/compressor_test.zig | |
index 51f459cd6..d0bfcd3bf 100644 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index 015832913..5446b89fe 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -37,6 +37,10 @@ set(CMAKE_USER_MAKE_RULES_OVERRIDE | |
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX | |
${CMAKE_CURRENT_SOURCE_DIR}/cmake/cxx_flag_overrides.cmake) | |
+message(STATUS "----------------- ${CMAKE_C_COMPILER}") | |
+file(TO_CMAKE_PATH ${CMAKE_C_COMPILER} CMAKE_C_COMPILER) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prefix=/usr | |
includedir=${prefix}/include | |
libdir=${prefix}/lib | |
have_drm_backend=true | |
have_x11_backend=true | |
have_libinput_backend=true | |
have_xwayland=true | |
have_gles2_renderer=true | |
have_vulkan_renderer=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[master⋅563-0⋅0-0] tiberius▸ cat z0.zig | |
const std = @import("std"); | |
pub fn main() !void { | |
var a: u32 = 0; | |
var b: i32 = 0; | |
_ = @minimum(a, b); | |
} | |
[master⋅563-0⋅0-0] tiberius▸ _build/stage3/bin/zig build-obj z0.zig | |
z0.zig:6:21: error: expected u32, found i32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ### THIS IS A LINE-SPLIT OF THE FOLLOWING COMMAND ### | |
# | |
# export PATH=/bin:/usr/bin | |
# | |
# /usr/bin/cmake -G Ninja \ | |
# -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja \ | |
# -DCMAKE_BUILD_TYPE=Release \ | |
# -DCMAKE_INSTALL_PREFIX=/opt/llvm-linux-x86_64-13.0.0-release \ | |
# -DPython3_EXECUTABLE=/usr/bin/python3.9 \ | |
# -DLLVM_PARALLEL_LINK_JOBS=1 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ### THIS IS A LINE-SPLIT OF THE FOLLOWING COMMAND ### | |
# | |
# export PATH=/usr/bin:/bin:/usr/sbin:/sbin | |
# export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer | |
# export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk | |
# | |
# /opt/local-2021.02/bin/cmake -G Ninja \ | |
# -DCMAKE_MAKE_PROGRAM=/opt/local-2021.02/bin/ninja \ | |
# -DCMAKE_BUILD_TYPE=Release \ | |
# -DCMAKE_INSTALL_PREFIX=/opt/llvm-macos11.0-x86_64-13.0.0-release \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/zig_clang.cpp b/src/zig_clang.cpp | |
index a6b4683a4..e6d1102ca 100644 | |
--- a/src/zig_clang.cpp | |
+++ b/src/zig_clang.cpp | |
@@ -1051,7 +1051,7 @@ static_assert((clang::Decl::Kind)ZigClangDeclStaticAssert == clang::Decl::Static | |
static_assert((clang::Decl::Kind)ZigClangDeclTranslationUnit == clang::Decl::TranslationUnit, ""); | |
void ZigClang_detect_enum_BuiltinTypeKind(clang::BuiltinType::Kind x) { | |
- switch (x) { | |
+ switch (static_cast<ZigClangBuiltinTypeKind>(x)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index 27ed0ac73..9cf132a52 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -91,6 +91,9 @@ set(ZIG_SINGLE_THREADED off CACHE BOOL "limit the zig compiler to use only 1 thr | |
set(ZIG_OMIT_STAGE2 off CACHE BOOL "omit the stage2 backend from stage1") | |
set(ZIG_ENABLE_LOGGING off CACHE BOOL "enable logging") | |
+set(ZIG0_ONLY off CACHE BOOL "Build only zig0") | |
+set(ZIG0_EXECUTABLE "" CACHE STRING "Path to already-built zig0 binary") |