aboutsummaryrefslogtreecommitdiff
path: root/cmake
AgeCommit message (Collapse)Author
2021-08-15cmake: update to LLVM 13 rc1Andrew Kelley
More precisely, aac4fe380d16a957627af2d6e5110ee35ad7e7e7 which is the current tip of release/13.x. Immediately following commits are tracking the same LLVM version.
2021-06-29Remove mention of lldMachO from the projectJakub Konka
including: * finding lldMachO in CMake config * punting `ld64.lld` to LLD linker * providing bindings to LLD linker
2021-03-13Merge remote-tracking branch 'origin/master' into llvm12Andrew Kelley
2021-03-13cmake build: allow overriding whether to use llvm-configAndrew Kelley
Previously, there was an option ZIG_PREFER_LLVM_CONFIG which would override the default of not using llvm-config when cross compiling. That option is now removed in favor of the more powerful ZIG_USE_LLVM_CONFIG which defaults to OFF for cross compiling and ON for native compilation. The option overrides the default. This will be used in zig-bootstrap to improve support for native builds.
2021-03-01cmake: update findllvm.cmake file to include llvm12 librariesTimon Kruiper
2020-12-16Update LLVM version numbers in CMakeJakub Konka
2020-11-02fix cmake logic for checking LLVM versionAndrew Kelley
2020-10-16Add llvm-config detection when dynlinking clangJakub Konka
2020-10-07Merge remote-tracking branch 'origin/master' into llvm11Andrew Kelley
Conflicts: cmake/Findllvm.cmake The llvm11 branch changed 10's to 11's and master branch added the "using LLVM_CONFIG_EXE" help message, so the resolution was to merge these changes together. I also added a check to make sure LLVM is built with AVR enabled, which is no longer an experimental target.
2020-10-06Update the list of libraries that llvm11 usesTimon Kruiper
2020-10-04cmake: add option to use llvm-config to find cross-target llvm depsJohn Sullivan
2020-09-26Print the llvm-config path on configuration errorFrank Denis
This is helpful on systems with multiple LLVM installations. For example, OpenBSD ships with LLVM in the base system, but without support for extra targets. A full LLVM version can be installed using the ports system, but even when it is, `cmake` is not going to pick it up unless `/usr/local` is explicitly added to the `cmake` search paths. Having the full `llvm-config` path printed on error is helpful to understand that the detected LLVM version was not the expected one.
2020-09-03Merge remote-tracking branch 'origin/master' into llvm11Andrew Kelley
2020-09-01Fixing dylib search pathpwzk
2020-07-24llvm11: link against libClangToolingCoreAndrew Kelley
This is needed to successfully link against llvm, clang, and lld 11.
2020-07-24update LLVM 10 version numbers to 11Andrew Kelley
2020-04-17update cmake, update readme, in response to the dynamic linking fiascoAndrew Kelley
2020-04-11cmake: allow not finding some clang libsAndrew Kelley
partial revert of aaf99371b22e816a4162391d799b9d22bba21120 because it broke the build for some people
2020-04-10put the previous commit behind cmake option ZIG_PREFER_CLANG_CPP_DYLIBAndrew Kelley
Without this, building from source caused: CommandLine Error: Option 'mc-relax-all' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options This is due to LLVM static libs compiled in multiple times. But without the LLVM static libs on the linker line, it caused undefined symbol linker errors. So our hands are tied. Homebrew users will have to specify `-DZIG_PREFER_CLANG_CPP_DYLIB`.
2020-04-10look for clang-cpp shared lib when it existsAndrew Kelley
See #4799
2020-04-07Fix paths to find llvm/clang on DragonFlyMichael Neumann
2020-04-06cmake: improvements to cross-compiling for WindowsAndrew Kelley
* don't unconditionally pass -lz3 for mingw builds. If mingw builds require this then the llvm-config executable should put it as part of --system-libs. If there is a bug and it does not do that, and we need a workaround, then the workaround should be an explicit cmake option. * don't link libstage2.a against -lntdll. This causes zig to set `builtin.link_mode == .Dynamic` and include the TLS definitions, which then collide with the mingw-w64 symbols. This should probably be addressed separately, but for now this solves the problem and there is no reason to link a static library against a DLL. * Findllvm.cmake no longer treats the libraries as "optional" and will emit a cmake error if one is not found. Additionally, the not-required LLVM library LLVMTableGen is omitted.
2020-03-30Create an "LLD_LIBDIRS" var to override lld locBrian Cain
2020-03-27cmake: support cross compilingAndrew Kelley
2020-03-27Merge pull request #4827 from ziglang/zig-cppAndrew Kelley
support compiling and linking c++ code
2020-03-27cmake: support finding a cross compiled llvmAndrew Kelley
2020-03-25cmake: address new warnings from cmake-3.17Michael Dusan
Match package-name case from CMakeLists.txt . New warning sample: The package name passed to `find_package_handle_standard_args` (LLVM) does not match the name of the calling package (llvm). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern.
2020-03-22simplify cmake logic for finding clangAndrew Kelley
which fixes the build on windows
2020-02-25Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-02-16rename libuserland to libstage2Andrew Kelley
2020-02-16remove libc dependency of zig0 building libstage2Andrew Kelley
Rather than `zig0 build ...` the build now does `zig0 build-lib ...`, avoiding the requirement of linking the build script, and thus avoiding the requirement of finding native libc, for systems where libc is the system ABI.
2020-01-22Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-01-17cmake: support `make` and `make install`Michael Dusan
(2nd attempt to get this right)
2020-01-16Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2019-10-16msvc: reduce inlining aggressivity to workaround a codegen bug in cl.exe cf. ↵Sahnvour
#3024
2019-10-16stage1: override cmake's default compilation flags to statically link the ↵Sahnvour
CRT on windows we want to use /MT instead of /MD for a fully static executable
2019-10-12Fix lld search pathLemonBoy
2019-10-02llvm 9.0.0 => llvm 10.0.0Andrew Kelley
2019-07-17update zig codebase to llvm 9Andrew Kelley
2019-07-16update to llvm9 trunkAndrew Kelley
2019-07-16cmake: allow user to select static vs dynamic LLVMdaurnimator
2019-07-09Revert "fixed path with spaces in llvm-config (#2854)"Andrew Kelley
This reverts commit d23798a296ddab023009dab860b6cb9361a62abd. This caused build problems for several people.
2019-07-09fixed path with spaces in llvm-config (#2854)Ian Lilley
* fixed path with spaces in llvm-config
2019-04-24Fix alignment of macro FIND_AND_ADD_CLANG_LIBWink Saville
2019-02-28Merge remote-tracking branch 'origin/master' into llvm8Andrew Kelley
2019-02-24add `zig cc` command to act like a C compilerAndrew Kelley
closes #490
2019-02-09Merge remote-tracking branch 'origin/master' into llvm8Andrew Kelley
2019-02-07build: update Findllvm.cmake for llvm 8Andrew Kelley
2019-02-07build: make sure LLVM is exactly correctAndrew Kelley
* check the version to be the correct major version * ensure that it has all the default targets enabled
2019-02-07build: make sure LLVM is exactly correctAndrew Kelley
* check the version to be the correct major version * ensure that it has all the default targets enabled