authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-04-07 13:04:37-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2020-04-07 13:04:37-04:00
loga20f3e3f02b24219f43c2da4568b794051e7d348
treec16b2d6ef4dad8fdf28543b0e1a0ab23d15b2348
parentab05766674b88dc7715d27f7d590d6832ee005ca
parent2b9cef1e0414f01e024af6f69a885faaeaa95f7c
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #4972 from mneumann/dragonfly-fix-compile

Fix compile on Dragonfly

4 files changed, 14 insertions(+), 2 deletions(-)

cmake/Findclang.cmake+2
...@@ -13,6 +13,7 @@ find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h...@@ -13,6 +13,7 @@ find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
13 /usr/lib/llvm-10/include13 /usr/lib/llvm-10/include
14 /usr/lib/llvm-10.0/include14 /usr/lib/llvm-10.0/include
15 /usr/local/llvm100/include15 /usr/local/llvm100/include
16 /usr/local/llvm10/include
16 /mingw64/include)17 /mingw64/include)
1718
18macro(FIND_AND_ADD_CLANG_LIB _libname_)19macro(FIND_AND_ADD_CLANG_LIB _libname_)
...@@ -24,6 +25,7 @@ macro(FIND_AND_ADD_CLANG_LIB _libname_)...@@ -24,6 +25,7 @@ macro(FIND_AND_ADD_CLANG_LIB _libname_)
24 /usr/lib/llvm-10/lib25 /usr/lib/llvm-10/lib
25 /usr/lib/llvm-10.0/lib26 /usr/lib/llvm-10.0/lib
26 /usr/local/llvm100/lib27 /usr/local/llvm100/lib
28 /usr/local/llvm10/lib
27 /mingw64/lib29 /mingw64/lib
28 /c/msys64/mingw64/lib30 /c/msys64/mingw64/lib
29 c:\\msys64\\mingw64\\lib)31 c:\\msys64\\mingw64\\lib)
cmake/Findlld.cmake+3
...@@ -10,12 +10,14 @@ find_path(LLD_INCLUDE_DIRS NAMES lld/Common/Driver.h...@@ -10,12 +10,14 @@ find_path(LLD_INCLUDE_DIRS NAMES lld/Common/Driver.h
10 PATHS10 PATHS
11 /usr/lib/llvm-10/include11 /usr/lib/llvm-10/include
12 /usr/local/llvm100/include12 /usr/local/llvm100/include
13 /usr/local/llvm10/include
13 /mingw64/include)14 /mingw64/include)
1415
15find_library(LLD_LIBRARY NAMES lld-10.0 lld100 lld16find_library(LLD_LIBRARY NAMES lld-10.0 lld100 lld
16 PATHS17 PATHS
17 /usr/lib/llvm-10/lib18 /usr/lib/llvm-10/lib
18 /usr/local/llvm100/lib19 /usr/local/llvm100/lib
20 /usr/local/llvm10/lib
19)21)
20if(EXISTS ${LLD_LIBRARY})22if(EXISTS ${LLD_LIBRARY})
21 set(LLD_LIBRARIES ${LLD_LIBRARY})23 set(LLD_LIBRARIES ${LLD_LIBRARY})
...@@ -27,6 +29,7 @@ else()...@@ -27,6 +29,7 @@ else()
27 ${LLD_LIBDIRS}29 ${LLD_LIBDIRS}
28 /usr/lib/llvm-10/lib30 /usr/lib/llvm-10/lib
29 /usr/local/llvm100/lib31 /usr/local/llvm100/lib
32 /usr/local/llvm10/lib
30 /mingw64/lib33 /mingw64/lib
31 /c/msys64/mingw64/lib34 /c/msys64/mingw64/lib
32 c:/msys64/mingw64/lib)35 c:/msys64/mingw64/lib)
cmake/Findllvm.cmake+3-1
...@@ -9,7 +9,7 @@...@@ -9,7 +9,7 @@
99
10if("${ZIG_TARGET_TRIPLE}" STREQUAL "native")10if("${ZIG_TARGET_TRIPLE}" STREQUAL "native")
11 find_program(LLVM_CONFIG_EXE11 find_program(LLVM_CONFIG_EXE
12 NAMES llvm-config-10 llvm-config-10.0 llvm-config100 llvm-config12 NAMES llvm-config-10 llvm-config-10.0 llvm-config100 llvm-config10 llvm-config
13 PATHS13 PATHS
14 "/mingw64/bin"14 "/mingw64/bin"
15 "/c/msys64/mingw64/bin"15 "/c/msys64/mingw64/bin"
...@@ -130,6 +130,7 @@ else()...@@ -130,6 +130,7 @@ else()
130 /usr/lib/llvm-10/include130 /usr/lib/llvm-10/include
131 /usr/lib/llvm-10.0/include131 /usr/lib/llvm-10.0/include
132 /usr/local/llvm100/include132 /usr/local/llvm100/include
133 /usr/local/llvm10/include
133 /mingw64/include)134 /mingw64/include)
134135
135 macro(FIND_AND_ADD_LLVM_LIB _libname_)136 macro(FIND_AND_ADD_LLVM_LIB _libname_)
...@@ -141,6 +142,7 @@ else()...@@ -141,6 +142,7 @@ else()
141 /usr/lib/llvm-10/lib142 /usr/lib/llvm-10/lib
142 /usr/lib/llvm-10.0/lib143 /usr/lib/llvm-10.0/lib
143 /usr/local/llvm100/lib144 /usr/local/llvm100/lib
145 /usr/local/llvm10/lib
144 /mingw64/lib146 /mingw64/lib
145 /c/msys64/mingw64/lib147 /c/msys64/mingw64/lib
146 c:\\msys64\\mingw64\\lib)148 c:\\msys64\\mingw64\\lib)
lib/std/os/bits/dragonfly.zig+6-1
...@@ -244,6 +244,12 @@ pub const KERN_MAXID = 37;...@@ -244,6 +244,12 @@ pub const KERN_MAXID = 37;
244244
245pub const HOST_NAME_MAX = 255;245pub const HOST_NAME_MAX = 255;
246246
247// access function
248pub const F_OK = 0; // test for existence of file
249pub const X_OK = 1; // test for execute or search permission
250pub const W_OK = 2; // test for write permission
251pub const R_OK = 4; // test for read permission
252
247pub const O_RDONLY = 0;253pub const O_RDONLY = 0;
248pub const O_NDELAY = O_NONBLOCK;254pub const O_NDELAY = O_NONBLOCK;
249pub const O_WRONLY = 1;255pub const O_WRONLY = 1;
...@@ -277,7 +283,6 @@ pub const SEEK_END = 2;...@@ -277,7 +283,6 @@ pub const SEEK_END = 2;
277pub const SEEK_DATA = 3;283pub const SEEK_DATA = 3;
278pub const SEEK_HOLE = 4;284pub const SEEK_HOLE = 4;
279285
280pub const F_OK = 0;
281pub const F_ULOCK = 0;286pub const F_ULOCK = 0;
282pub const F_LOCK = 1;287pub const F_LOCK = 1;
283pub const F_TLOCK = 2;288pub const F_TLOCK = 2;