summaryrefslogtreecommitdiffstats
path: root/lib/clang/clang.build.mk
Commit message (Collapse)AuthorAgeFilesLines
* MFC r309124:dim2016-12-261-247/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.9.0 release, and add lld 3.9.0. Also completely revamp the build system for clang, llvm, lldb and their related tools. Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 support to build; see UPDATING for more information. Release notes for llvm, clang and lld are available here: <http://llvm.org/releases/3.9.0/docs/ReleaseNotes.html> <http://llvm.org/releases/3.9.0/tools/clang/docs/ReleaseNotes.html> <http://llvm.org/releases/3.9.0/tools/lld/docs/ReleaseNotes.html> Thanks to Ed Maste, Bryan Drewery, Andrew Turner, Antoine Brodin and Jan Beich for their help. Relnotes: yes MFC r309147: Pull in r282174 from upstream llvm trunk (by Krzysztof Parzyszek): [PPC] Set SP after loading data from stack frame, if no red zone is present Follow-up to r280705: Make sure that the SP is only restored after all data is loaded from the stack frame, if there is no red zone. This completes the fix for https://llvm.org/bugs/show_bug.cgi?id=26519. Differential Revision: https://reviews.llvm.org/D24466 Reported by: Mark Millard PR: 214433 MFC r309149: Pull in r283060 from upstream llvm trunk (by Hal Finkel): [PowerPC] Refactor soft-float support, and enable PPC64 soft float This change enables soft-float for PowerPC64, and also makes soft-float disable all vector instruction sets for both 32-bit and 64-bit modes. This latter part is necessary because the PPC backend canonicalizes many Altivec vector types to floating-point types, and so soft-float breaks scalarization support for many operations. Both for embedded targets and for operating-system kernels desiring soft-float support, it seems reasonable that disabling hardware floating-point also disables vector instructions (embedded targets without hardware floating point support are unlikely to have Altivec, etc. and operating system kernels desiring not to use floating-point registers to lower syscall cost are unlikely to want to use vector registers either). If someone needs this to work, we'll need to change the fact that we promote many Altivec operations to act on v4f32. To make it possible to disable Altivec when soft-float is enabled, hardware floating-point support needs to be expressed as a positive feature, like the others, and not a negative feature, because target features cannot have dependencies on the disabling of some other feature. So +soft-float has now become -hard-float. Fixes PR26970. Pull in r283061 from upstream clang trunk (by Hal Finkel): [PowerPC] Enable soft-float for PPC64, and +soft-float -> -hard-float Enable soft-float support on PPC64, as the backend now supports it. Also, the backend now uses -hard-float instead of +soft-float, so set the target features accordingly. Fixes PR26970. Reported by: Mark Millard PR: 214433 MFC r309212: Add a few missed clang 3.9.0 files to OptionalObsoleteFiles. MFC r309262: Fix packaging for clang, lldb and lld 3.9.0 During the upgrade of clang/llvm etc to 3.9.0 in r309124, the PACKAGE directive in the usr.bin/clang/*.mk files got dropped accidentally. Restore it, with a few minor changes and additions: * Correct license in clang.ucl to NCSA * Add PACKAGE=clang for clang and most of the "ll" tools * Put lldb in its own package * Put lld in its own package Reviewed by: gjb, jmallett Differential Revision: https://reviews.freebsd.org/D8666 MFC r309656: During the bootstrap phase, when building the minimal llvm library on PowerPC, add lib/Support/Atomic.cpp. This is needed because upstream llvm revision r271821 disabled the use of std::call_once, which causes some fallback functions from Atomic.cpp to be used instead. Reported by: Mark Millard PR: 214902 MFC r309835: Tentatively apply https://reviews.llvm.org/D18730 to work around gcc PR 70528 (bogus error: constructor required before non-static data member). This should fix buildworld with the external gcc package. Reported by: https://jenkins.freebsd.org/job/FreeBSD_HEAD_amd64_gcc/ MFC r310194: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 3.9.1 release. Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 support to build; see UPDATING for more information. Release notes for llvm, clang and lld will be available here: <http://releases.llvm.org/3.9.1/docs/ReleaseNotes.html> <http://releases.llvm.org/3.9.1/tools/clang/docs/ReleaseNotes.html> <http://releases.llvm.org/3.9.1/tools/lld/docs/ReleaseNotes.html> Relnotes: yes
* Similar to r256297, disable assertions in llvm and clang for thedim2016-08-161-1/+1
| | | | | | stable/11 branch. This reduces the size of the clang executable, and improves its performance. Also bump FREEBSD_CC_VERSION to make some version number room for the branch.
* Make armv6 hard float abi by default. Kill armv6hf.imp2016-05-181-4/+7
| | | | | | | Allow CPUTYPE=soft to build the current soft-float abi libraries. Add UPDATING entry to announce this. Approved by: re@ (gjb)
* Limit Options.inc generation to desired targetsemaste2016-05-051-2/+3
| | | | | | | | | | | | | | As mentioned in the Makefile there's an "atrocious" hack to generate a different version of Options.inc.h, depending on the library being built. Remove the catch-all else case and limit it to specific libraries, so that we don't accidentally use the Options.inc.h from clangdriver if a future libary also uses Options.inc.h. Reviewed by: dim Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6209
* Use the new bmake .dinclude feature to make these safe.bdrewery2016-03-111-5/+9
| | | | | | | | At least FAST_DEPEND won't even run 'make depend', so the code was potentially broken with FAST_DEPEND anyhow. The .dinclude directive will ignore missing files rather than make them be fatal. Sponsored by: EMC / Isilon Storage Division
* Merge ^/head r295902 through r296006.dim2016-02-241-4/+0
|\
| * FAST_DEPEND: Always run depend via beforebuild which removes many hacks.bdrewery2016-02-241-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will generate dependencies rather than depending on the previous behavior of depending on the guessed OBJS: *.h dependecies or a user running 'make depend'. Experimentation showed that depending only on headers was not enough and prone to .ORDER errors. Downstream users may also have added dependencies into beforedepend or afterdepend targets. The safest way to ensure dependencies are generated before build is to run 'make depend' beforehand rather than just depending on DPSRCS+SRCS. Note that the OBJS_DEPEND_GUESS mechanism (a.k.a .if !exists(.depend) then foo.o: *.h) is still useful as it improves incremental builds with missing .depend.* files and allows 'make foo.o' to usually work, while this 'beforebuild: depend' ensures that the build will always find all dependencies. The 'make foo.o' case has no means of a 'beforebuild' hook. This also removes several hacks in the DIRDEPS_BUILD: - NO_INSTALL_INCLUDES is no longer needed as it mostly was to work around .ORDER problems with building the needed headers early. - DIRDEPS_BUILD: It is no longer necesarry to track "local dependencies" in Makefile.depend. These were only in Makefile.depend for 'clean builds' since nothing would generate the files due to skipping 'make depend' and early dependency bugs that have been fixed, such as adding headers into SRCS for the OBJS_DEPEND_GUESS mechanism. Normally if a .depend file does not exist then a dependency is added by bsd.lib.mk/bsd.prog.mk from OBJS: *.h. However, meta.autodep.mk creates a .depend file from created meta files and inserts that into Makefile.depend. It also only tracks *.[ch] files though which can miss some dependencies that are hooked into 'make depend'. This .depend that is created then breaks incremental builds due to the !exists(.depend) checks for OBJS_DEPEND_GUESS. The goal was to skip 'make depend' yet it only really works the first time. After that files are not generated as expected, which r288966 tried to address but was using buildfiles: rather than beforebuild: and was reverted in r291725. As noted previously, depending only on headers in beforebuild: would create .ORDER errors in some cases. meta.autodep.mk is still used to generate Makefile.depend though via: gendirdeps: Makefile.depend .END: gendirdeps This commit allows removing all of the "local dependencies" in Makefile.depend which cuts down on churn and removes some of the arch-dependent Makefile.depend files. The "local dependencies" were also problematic for bootstrapping. Sponsored by: EMC / Isilon Storage Division
* | First part of updating llvm/clang build glue: getting llvm-tblgen,dim2015-12-311-5/+16
|/ | | | clang-tblgen and clang itself built.
* META MODE: Rework [bootstrapped] tools PATH support.bdrewery2015-12-011-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Support more of the toolchain from TOOLSDIR. - This also improves 'make bootstrap-tools' to pass, for example, AS=/usr/bin/as to Makefile.inc1, which will tell cross-tools to use external toolchain support and avoid building things we won't be using in the build. - Always set the PATH to contain the staged TOOLSDIR directories when not building the bootstrap targets. The previous version was only setting this at MAKE.LEVEL==0 and if the TOOLSDIR existed. Both of these prevented using staged tools that were built during the build though as DIRDEPS with .host dependencies, such as the fix for needing usr.bin/localedef.host in r291311. This is not a common tool so we must build and use it during the build, and need to be prepared to change PATH as soon as it appears. This should also fix the issue of host dependencies disappearing from Makefile.depend and then reappearing due to the start of the fresh build not having the directory yet, resulting in the tools that were built not actually being used. - Only use LEGACY_TOOLS while building in Makefile.inc1. After r291317 and r291546 there is no need to add LEGACY_TOOLS into the PATH for the pseudo/targets/toolchain build. - Because the pseudo/targets/toolchain will now build its own [clang-]tblgen, the special logic in clang.build.mk is no longer needed. - LEGACY_TOOLS is no longer used outside of targets/pseudo/bootstrap-tools so is no longer passed into the environment in its build. Sponsored by: EMC / Isilon Storage Division
* Only DIRDEPS_BUILD should trigger this logic.bdrewery2015-11-301-2/+2
| | | | | | Missed in r290816. Sponsored by: EMC / Isilon Storage Division
* Remove redundant DPSRCS which were already in SRCS.bdrewery2015-11-251-1/+0
| | | | | | | DPSRCS already contains all of SRCS. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* Conditionalize the META_MODE tool handling on MK_META_MODE.bdrewery2015-10-171-0/+2
| | | | | | | It was not being used outside of META_MODE but this should make it more clear that it is only for META_MODE. Sponsored by: EMC / Isilon Storage Division
* For llvm/clang libraries, skip including tablegen-produced .d files whendim2015-10-061-3/+5
| | | | | | | | the target is "make depend". This works around errors during incremental make depend of some clang libraries, for example "don't know how to make contrib/llvm/include/llvm/IR/IntrinsicsR600.td". Reported by: emaste
* Update llvm/clang build glue.dim2015-06-231-0/+9
|
* Add META_MODE support.sjg2015-06-131-0/+22
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * Merge sync of headsjg2015-05-271-29/+25
| |\ | |/ |/|
| * Merge from head@274682sjg2014-11-191-5/+4
| |\
| * \ Merge head from 7/28sjg2014-08-191-83/+109
| |\ \
| * | | Ensure clang-tblgen in TOOLSDIRsjg2014-05-161-1/+1
| | | |
| * | | Handle bootstrapping for hostsjg2014-05-161-2/+11
| | | |
| * | | Merge from headsjg2014-05-081-0/+2
| |\ \ \
| * \ \ \ Merge headsjg2014-04-281-7/+22
| |\ \ \ \
| * | | | | Use the tblgen etc we built for host.sjg2013-10-171-0/+4
| | | | | |
| * | | | | Merge head@256308sjg2013-10-141-2/+2
| | | | | |
| * | | | | Make sure we trigger generation of headerssjg2013-10-121-0/+4
| | | | | |
* | | | | | Merging ^/head r278224 through r278297.dim2015-02-051-1/+2
|\ \ \ \ \ \
| * | | | | | Followup to r278223, by only using -stdlib=libc++ when the compiler isdim2015-02-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang; not even recent versions of gcc support the -stdlib flag. Noticed by: ngie
* | | | | | | Merge ^/head r278110 through r278223.dim2015-02-041-1/+1
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | For now, add -stdlib=libc++ to the flags for building clang, since thatdim2015-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | makes it easier to build head on stable/9, where libstdc++ is still the default. We can revisit this when somebody will try to build base with gcc 4.8.1 or higher, and its included libstdc++. Reported by: rpaulo
* | | | | | | Update llvm and clang library and binary Makefiles for 3.6.0 rc1.dim2015-01-261-1/+1
|/ / / / / /
* | | | | | Add the AArch64 llvm backend to the build to allow for early testing anddim2015-01-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to ease any rework of how clang is built to take arm64 in to account. Submitted by: andrew Reviewed by: andrew, emaste Differential Revision: https://reviews.freebsd.org/D1446
* | | | | | Disable the ObjC rewriter modules, since according to rdivacky these aredim2014-11-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | only used by Xcode. This shaves off some compilation time.
* | | | | | Update llvm and clang library Makefiles.dim2014-11-241-22/+11
| |_|_|_|/ |/| | | |
* | | | | Fix the TARGET_ABI value clang uses. It shpuld be gnueabi on all ARMandrew2014-10-011-3/+3
| | | | | | | | | | | | | | | | | | | | soft-float architectures, and gnueabihf for hard-float.
* | | | | Remove MK_ARM_EABI, the armeb issues have been fixed. The code to supportandrew2014-10-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the oabi is still in the tree, but it is expected this will be removed as developers work on surrounding code. With this commit the ARM EABI is the only supported supported ABI by FreeBSD on ARMa 32-bit processors. X-MFC after: never Relnotes: yes Differential Revision: https://reviews.freebsd.org/D876
* | | | | Replace DPADD with DPSRCS to fix "make checkdpadd"ngie2014-08-181-1/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Phabric: D625 Approved by: jmmv (mentor) Reviewed by: dim PR: 192734 MFC after: 2 weeks
* | | | In some scenarios, when generating llvm/clang .inc.h files, multipledim2014-06-101-32/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source files could be passed to tblgen or clang-tblgen, leading to a "Too many positional arguments specified" error message. Fix this by replacing the too-generic ${.ALLSRC} sources with explicit paths. Reported by: rysto32@gmail.com, rodrigc MFC after: 3 days
* | | | Use the new -d option that was added to tblgen between llvm/clang 3.3dim2014-05-141-78/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and 3.4 to generate dependency files for the '.inc.h' files generated from .td files, and .sinclude those dependency files in clang.build.mk. This will make future incremental builds of lib/clang and usr.bin/clang work correctly, whenever any of the .td files get modified. Note that this will not fix any problems with incremental builds from *before* this revision, since there will not yet be any generated dependency files. A quick workaround is to run the following: find /usr/obj -type f -name '*.inc.h' | xargs rm and then a regular incremental buildworld (e.g. with -DNO_CLEAN). MFC after: 3 days
* | | | Eliminate EARLY_BUILD flag. It is redundant and means MK_CLANG_FULL=noimp2014-05-101-2/+2
| |_|/ |/| | | | | | | | | | | | | | and MK_LLDB=no, so set those explicitly (now that we can do that). Simplify tests for these variables as well, since we know they will always be defined regardless of the phase of the build.
* | | Use src.opts.mk in preference to bsd.own.mk except where we need stuffimp2014-05-061-0/+2
| |/ |/| | | | | from the latter.
* | Add a new ARM TARGET_ARCH, armv6hf. This is considered experimental.andrew2014-03-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This targets the existing ARMv6 and ARMv7 SoCs that contain a VFP unit. This is an optional coprocessors may not be present in all devices, however it appears to be in all current SoCs we support. armv6hf targets the VFP variant of the ARM EABI and our copy of gcc is too old to support this. Because of this there are a number of WITH/WITHOUT options that are unsupported and must be left as the default value. The options and their required value are: * WITH_ARM_EABI * WITHOUT_GCC * WITHOUT_GNUCXX In addition, without an external toolchain, the following need to be left as their default: * WITH_CLANG * WITH_CLANG_IS_CC As there is a different method of passing float and double values to functions the ABI is incompatible with existing armv6 binaries. To use this a full rebuild of world is required. Because no floating point values are passed into the kernel an armv6 kernel with VFP enabled will work with an armv6hf userland and vice versa.
* | Add Makefile glue to build the Sparc backend libraries and link themdim2014-02-201-1/+1
| | | | | | | | into the clang executable.
* | Upgrade our copy of llvm/clang to 3.4 release. This version supportsdim2014-02-161-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | all of the features in the current working draft of the upcoming C++ standard, provisionally named C++1y. The code generator's performance is greatly increased, and the loop auto-vectorizer is now enabled at -Os and -O2 in addition to -O3. The PowerPC backend has made several major improvements to code generation quality and compile time, and the X86, SPARC, ARM32, Aarch64 and SystemZ backends have all seen major feature work. Release notes for llvm and clang can be found here: <http://llvm.org/releases/3.4/docs/ReleaseNotes.html> <http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html> MFC after: 1 month
* | Bump OS versions in the toolchain triples to 11.0, and bump thedim2013-10-101-2/+2
|/ | | | | | __FreeBSD_cc_version predefined macros in clang and gcc. Approved by: re (gjb)
* Upgrade our copy of llvm/clang to 3.3 release.dim2013-06-121-1/+5
| | | | | | Release notes are still in the works, these will follow soon. MFC after: 1 month
* Upgrade our copy of llvm/clang to trunk r178860, in preparation of thedim2013-04-121-55/+69
| | | | | | | | | upcoming 3.3 release (branching and freezing expected in a few weeks). Preliminary release notes can be found at the usual location: <http://llvm.org/docs/ReleaseNotes.html> An MFC is planned once the actual 3.3 release is finished.
* Allow us to build clang for ARM EABI. Clang and llvm use theandrew2013-02-121-1/+9
| | | | | | | arm-gnueabi-freebsd10.0 triple for EABI. Use this when we are on arm or armv6 and are building for EABI. Reviewed by: dim
* Pull in r170135 from upstream clang trunk:dim2013-02-021-0/+6
| | | | | | | | | | | | | | | | Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the user specifies not to. Dont build ASTMatchers with Rewriter disabled and StaticAnalyzer when it's disabled. Without all those three, the clang binary shrinks (x86_64) from ~36MB to ~32MB (unstripped). To disable these clang components, and get a smaller clang binary built and installed, set WITHOUT_CLANG_FULL in src.conf(5). During the initial stages of buildworld, those extra components are already disabled automatically, to save some build time. MFC after: 1 week
* Upgrade our copy of llvm/clang to r168974, from upstream's release_32dim2012-12-031-14/+15
| | | | | branch. This is effectively llvm/clang 3.2 RC2; the 3.2 release is coming soon.
* Sprinkle a bit of style.Makefile(5) across various clang Makefiles. Nodim2012-08-231-13/+13
| | | | | | functional changes. MFC after: 3 days
OpenPOWER on IntegriCloud