Commit 0527b441ae

Andrew Kelley <andrew@ziglang.org>
2022-07-27 06:55:45
move zig.h to become an installation file
Now instead of zig.h being baked into the compiler binary, it is a header file distributed along with all the other header files distributed with Zig. Closes #11643
1 parent c6f5832
Changed files (3)
lib
include
src
link
src/link/C/zig.h → lib/include/zig.h
File renamed without changes
src/link/C.zig
@@ -15,7 +15,7 @@ const Air = @import("../Air.zig");
 const Liveness = @import("../Liveness.zig");
 
 pub const base_tag: link.File.Tag = .c;
-pub const zig_h = @embedFile("C/zig.h");
+pub const zig_h = "#include <zig.h>\n";
 
 base: link.File,
 /// This linker backend does not try to incrementally link output C source code.
CMakeLists.txt
@@ -749,7 +749,6 @@ set(ZIG_STAGE2_SOURCES
     "${CMAKE_SOURCE_DIR}/src/libunwind.zig"
     "${CMAKE_SOURCE_DIR}/src/link.zig"
     "${CMAKE_SOURCE_DIR}/src/link/C.zig"
-    "${CMAKE_SOURCE_DIR}/src/link/C/zig.h"
     "${CMAKE_SOURCE_DIR}/src/link/Coff.zig"
     "${CMAKE_SOURCE_DIR}/src/link/Elf.zig"
     "${CMAKE_SOURCE_DIR}/src/link/MachO.zig"