search for: zig

Displaying 20 results from an estimated 143 matches for "zig".

Did you mean: big
2018 Jul 25
2
LLD COFF library: crashes when lld::coff::link is called twice
If you call lld::coff::link twice, the second time gives this backtrace: msvcp140d.dll!00007ffc35830806() Unknown > zig.exe!std::_Debug_pointer<lld::coff::Chunk * __ptr64 const>(lld::coff::Chunk * const * _Ptr, const wchar_t * _File, unsigned int _Line) Line 926 C++ zig.exe!std::_Debug_range2<lld::coff::Chunk * __ptr64 const * __ptr64>(lld::coff::Chunk * const * _First, lld::coff::Chunk * const *...
2018 Aug 08
2
LLD COFF library: crashes when lld::coff::link is called twice
...to get this fix upstreamed? > > On Wed, Jul 25, 2018 at 2:18 AM, Andrew Kelley <superjoe30 at gmail.com> wrote: >> >> If you call lld::coff::link twice, the second time gives this backtrace: >> >> msvcp140d.dll!00007ffc35830806() Unknown >> > zig.exe!std::_Debug_pointer<lld::coff::Chunk * __ptr64 >> > const>(lld::coff::Chunk * const * _Ptr, const wchar_t * _File, unsigned int >> > _Line) Line 926 C++ >> zig.exe!std::_Debug_range2<lld::coff::Chunk * __ptr64 const * >> __ptr64>(lld::coff::Chun...
2017 Jun 14
2
Using LLD to create a .lib from a .def
...ortLibrary(); void parseModuleDefs(MemoryBufferRef MB); } // namespace coff } // namespace lld //========================================================================= This is so that I can write the following user code: // writes the output to dll_path with .dll replaced with .lib void ZigLLDDefToLib(Buf *def_contents, Buf *dll_path) { lld::coff::Config = new lld::coff::Configuration; auto mem_buf = MemoryBuffer::getMemBuffer(buf_ptr(def_contents)); MemoryBufferRef mbref(*mem_buf); lld::coff::parseModuleDefs(mbref); lld::coff::Config->OutputFile = buf_ptr(dll_p...
2018 Jan 05
0
llvm 5.0.1 requires downstream workaround for diaguids.lib
...m::pdb::IPDBSession,struct std::default_delete<class llvm::pdb::IPDBSession> > &)" (?createFromExe at DIASession@pdb at llvm@@SA?AVError at 3@VStringRef at 3 @AEAV?$unique_ptr at VIPDBSession@pdb at llvm@@U?$default_delete at VIPDBSession @pdb at llvm@@@std@@@std@@@Z) [C:\projects\zig-d3l86\build-msvc-release\zig.vcxproj] LLVMDebugInfoPDB.lib(DIASession.obj) : error LNK2019: unresolved external symbol IID_IDiaDataSource referenced in function "public: static class llvm::Error __cdecl llvm::pdb::DIASession::createFromExe(class llvm::StringRef,class std::unique_ptr<class l...
2017 Jun 15
2
Using LLD to create a .lib from a .def
...gt; //========================================================== >> =============== >> >> >> >> >> This is so that I can write the following user code: >> >> >> >> // writes the output to dll_path with .dll replaced with .lib >> void ZigLLDDefToLib(Buf *def_contents, Buf *dll_path) { >> lld::coff::Config = new lld::coff::Configuration; >> auto mem_buf = MemoryBuffer::getMemBuffer(buf_ptr(def_contents)); >> MemoryBufferRef mbref(*mem_buf); >> lld::coff::parseModuleDefs(mbref); >> lld...
2017 Dec 01
2
[Release-testers] 5.0.1-rc2 has been tagged
Zig tests using Debug build of 5.0.1rc2 hit this bug: https://bugs.llvm.org/show_bug.cgi?id=34452 I suppose the fix has not been backported to 5.0.1. So I created a Release build of 5.0.1rc2 and all zig tests pass, with the following patches: * Patches to LLD: commit a206ef34bbbc46017e471063a4a1832c...
2017 Jun 16
2
Using LLD to create a .lib from a .def
...========= >>>> >>>> >>>> >>>> >>>> This is so that I can write the following user code: >>>> >>>> >>>> >>>> // writes the output to dll_path with .dll replaced with .lib >>>> void ZigLLDDefToLib(Buf *def_contents, Buf *dll_path) { >>>> lld::coff::Config = new lld::coff::Configuration; >>>> auto mem_buf = MemoryBuffer::getMemBuffer(buf_ptr(def_contents)); >>>> MemoryBufferRef mbref(*mem_buf); >>>> lld::coff::parseMod...
2017 Sep 17
4
assertion triggered since update to llvm 5
...t be >>> used for MemoryAccesses")); >>> return InstrDFS.lookup(V); >>> } >>> >>> >>> >>> On Sat, Sep 16, 2017 at 1:48 PM, Andrew Kelley <superjoe30 at gmail.com> >>> wrote: >>> >>>> When zig updated to llvm 5 we started hitting this assertion: >>>> >>>> zig: >>>> /home/andy/downloads/llvm-project/llvm/include/llvm/Support/Casting.h:106: >>>> static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To >>>>...
2017 Sep 30
2
invalid code generated on Windows x86_64 using skylake-specific features
I have this code, which works fine on MacOS and Linux hosts: const char *target_specific_cpu_args; const char *target_specific_features; if (g->is_native_target) { target_specific_cpu_args = ZigLLVMGetHostCPUName(); target_specific_features = ZigLLVMGetNativeFeatures(); } else { target_specific_cpu_args = ""; target_specific_features = ""; } g->target_machine = LLVMCreateTargetMachine(target_ref, buf_ptr(&g->triple_str),...
2017 Sep 16
2
assertion triggered since update to llvm 5
When zig updated to llvm 5 we started hitting this assertion: zig: /home/andy/downloads/llvm-project/llvm/include/llvm/Support/Casting.h:106: static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = llvm::Instruction; From = llvm::Value]: Assertion `Val && "isa<&gt...
2017 Sep 17
2
assertion triggered since update to llvm 5
...ssert(V == nullptr || (isa<Instruction>(V) && "This should not be > used for MemoryAccesses")); > return InstrDFS.lookup(V); > } > > > > On Sat, Sep 16, 2017 at 1:48 PM, Andrew Kelley <superjoe30 at gmail.com> > wrote: > >> When zig updated to llvm 5 we started hitting this assertion: >> >> zig: /home/andy/downloads/llvm-project/llvm/include/llvm/Support/Casting.h:106: >> static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To >> = llvm::Instruction; From = llvm::Value]: Asserti...
2017 Sep 17
2
assertion triggered since update to llvm 5
...crash. I'm not familiar with your frontend but you might want to use -mllvm -opt-bisect-limit. On Sep 17, 2017 1:06 PM, "Andrew Kelley" <superjoe30 at gmail.com> wrote: Valgrind is strictly better than address sanitizer, is that right? It runs valgrind-clean: [nix-shell:~/dev/zig/build-llvm5-debug]$ valgrind ./zig build-obj test.zig --release-safe ==4585== Memcheck, a memory error detector ==4585== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==4585== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==4585== Command: ./zig build-obj...
2017 Oct 01
1
invalid code generated on Windows x86_64 using skylake-specific features
..., Andrew Kelley <superjoe30 at gmail.com> wrote: > I have this code, which works fine on MacOS and Linux hosts: > > const char *target_specific_cpu_args; > const char *target_specific_features; > if (g->is_native_target) { > target_specific_cpu_args = ZigLLVMGetHostCPUName(); > target_specific_features = ZigLLVMGetNativeFeatures(); > } else { > target_specific_cpu_args = ""; > target_specific_features = ""; > } > > g->target_machine = LLVMCreateTargetMachine(target_ref,...
2018 Sep 12
2
How to make LLVM go faster?
Here is some timing information from running the Zig standard library tests: $ ./zig test ../std/index.zig --enable-timing-info Name Start End Duration Percent Initialize 0.0000 0.0010 0.0010 0.0001 Semantic Analysis 0.0010 0.9968 0.9958 0.1192 Code Genera...
2017 Mar 10
2
Can we add this project to External Open Source Projects Using LLVM 4.0 in the release notes?
Zig Programming Language Zig <http://ziglang.org/> is a system programming language which prioritizes optimality, safety, and readability. It integrates closely with C and is intended to eventually take the place of C. It uses LLVM to produce highly optimized native code and to cross-compile for...
2020 Nov 11
0
Building an LLVM cross-compiler
You could try using zig for this. Here's an example build script of zig cross compiling llvm, lld, clang, and finally itself: https://github.com/ziglang/zig-bootstrap You can see the build script is not too complicated. The main trick is using CC and CXX to use `zig cc` and `zig c++` as drop-in replacements for a...
2018 Jun 05
2
Mach-O support in lld: what are the known issues?
...an the platform I'd prefer to exist. But that's probably just me being crazy, and I'm not going to work on it. :) On Tue, Jun 5, 2018 at 11:19 AM Andrew Kelley via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Are you planning on working on LLD? > > Over here in the Zig frontend, we've been relying on LLD Mach-O support > but at some point we'll have to either maintain LLD or write a Mach-O > linker in zig. So far we've been making it work with this hacky patch: > https://github.com/ziglang/zig/commit/1ba6e1641a4c5ea1d0d665fe500c9c66d69443a4 &...
2018 Nov 27
3
apt.llvm.org has the wrong binaries/headers for llvm-toolchain-xenial-7
...This build worked on Nov 24 and stopped working Nov 25. > > 2018-11-25T16:48:47.6020966Z + sudo sh -c echo "deb > http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" >> > /etc/apt/sources.list > ... > 2018-11-25T16:53:30.7836235Z > /home/vsts/work/1/s/src/zig_llvm.cpp:686:1: error: static assertion > failed > 2018-11-25T16:53:30.7837134Z > static_assert((Triple::OSType)ZigLLVM_LastOSType == > Triple::LastOSType, ""); > 2018-11-25T16:53:30.7837409Z ^~~~~~~~~~~~~ > full logs https://dev.azure.com/ziglang/zig/_build/results?buil...
2018 Sep 12
2
How to make LLVM go faster?
...Frontends would be better off implementing coroutines on top of structs, like Rust does. On Tue, Sep 11, 2018 at 9:01 PM Friedman, Eli <efriedma at codeaurora.org> wrote: > On 9/11/2018 5:48 PM, Andrew Kelley via llvm-dev wrote: > > Here is some timing information from running the Zig standard library > tests: > > $ ./zig test ../std/index.zig --enable-timing-info > Name Start End Duration Percent > Initialize 0.0000 0.0010 0.0010 0.0001 > Semantic Analysis 0.0010 0.9968 0.9958...
2017 Oct 16
2
LLD COFF not closing mmaps to input files?
...172,6 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) { // Write the result. writeResult(&Symtab); - - // Call exit to avoid calling destructors. - exit(0); } } // namespace coff I'm getting this error from LLVM: unable to write object file c:\msys64\home\andy\zig\zig-cache\compiler_rt.obj: The requested operation cannot be performed on a file with a user-mapped section open. The same process calls LLD with this .obj as a linker input file, then tries to write to the same .obj file later. I believe LLD is mmapping the .obj file and then not cleaning it up...