Commit Graph

60 Commits

Author SHA1 Message Date
David Nadlinger
470323233a Merged build system patches by Jonathan Mercier.
In detail, this commit:
 - Changes the default version that is built to D2, use D_VERSION to override.
 - Reverts back to building static libs by default until we are certain shared libs work fine everywhere.
 - Fixes installation pathes so that CMAKE_INSTALL_PREFIX is respected; /etc as sysconf dir for /usr prefix is special-cased.
 - Fixes out-of-source builds again, and causes temporary files (idgen, …) not to be written to the source directory anymore.

This is a slightly cleaned up version of the changes from https://github.com/ldc-developers/ldc/pull/12.
2011-11-09 20:40:39 +01:00
Jonathan MERCIER
52c6347ef7 now conf files have right value 2011-10-12 03:27:23 +02:00
Jonathan MERCIER
350d4a0629 By default buils as shared lib 2011-10-12 03:07:42 +02:00
Jonathan MERCIER
32cbc798c0 Install lib could go to lib or lib64 directory by example for follow os rules 2011-10-12 03:03:42 +02:00
Jonathan MERCIER
3fa4311371 quote string var 2011-10-10 15:10:56 +02:00
Jonathan MERCIER
ebe55afa97 now we can choose llvm config header's filename 2011-10-10 14:32:57 +02:00
Jonathan MERCIER
7cd248dd75 add suffix for libdir is usefull is on your system lib 64bit need to got to /usr/lib64 2011-10-10 14:02:37 +02:00
Jonathan MERCIER
4bbd23b287 Set directory where lib will be put default lib 2011-10-10 13:56:59 +02:00
Jonathan MERCIER
c5a3ec9d1d Set default configuration path for install to /etc 2011-10-10 13:52:40 +02:00
Jonathan MERCIER
a8903c0795 configuration file follow system rules 2011-10-10 13:49:34 +02:00
Jonathan MERCIER
30d2a6c08c Add comment in CMakeLists.txt 2011-10-10 13:23:01 +02:00
Jonathan MERCIER
07d90e334e Replace PROJECT_BINARY_DIR by PROJECT_SOURCE_DIR for to be more cohesive 2011-10-10 13:18:31 +02:00
Jonathan MERCIER
8803990d2f remove exrta tab for use 4 spaces 2011-10-10 13:16:04 +02:00
Alexey Prokhin
423076dd82 CMakeLists: look for host target in llvm's config.h 2011-09-15 16:23:26 +04:00
David Nadlinger
ca76012343 Add header files to CMake build.
This way, they will be available in IDE project files generated via CMake.
2011-04-24 11:36:09 +02:00
David Nadlinger
d55055d44e Set executable bit on installed ldmd. 2011-04-17 06:20:35 +02:00
Moritz Warning
9e59fea83e fixes #453 :: allow installation of standalone version 2011-01-31 13:22:46 +01:00
Moritz Warning
5cdd34d3bb changes config install location to /etc; thanks to bioinfornatics 2011-01-22 17:55:56 +01:00
Alexey Prokhin
d0c7a5a3cb Ported to new debug information format introduced in llvm 2.7 2010-10-30 20:57:32 +04:00
Alexey Prokhin
4d7a6eda23 Different fixes for d2 2010-10-07 22:35:32 +04:00
Alexey Prokhin
93ddf8112b Fixed compilation of ldc2 2010-09-28 20:51:27 +04:00
Moritz Warning
fd4899f46f remove revisions.pl; we go with llvm releases now 2010-10-23 14:10:25 +02:00
Moritz Warning
c151d37365 fixes #434 :: add llvm 2.8 support 2010-10-23 13:38:26 +02:00
Tomas Lindquist Olsen
db0afdf3e0 Updated CMake building for 2.7 update. 2010-05-19 22:33:03 +02:00
Kelly Wilson
badb597962 Change the ldc.conf file output to match the newer Tango directory structure and only use libtango-user-ldc for the libs to match the 0.99.9 build instructions. 2010-03-10 20:21:05 -07:00
Tomas Lindquist Olsen
d5d3ecdb05 Added back option to disable metadata generation and users. Set USE_METADATA to OFF in ccmake. 2009-07-31 11:28:31 +02:00
Benjamin Kramer
51c02d192a Some minor cleanups
* remove an #ifdef USE_METADATA I accidently left in
* remove now unneeded llvm-version includes
* fix indentation in metadata.h
* prevent the "Found native target" message from interrupting ccmake
2009-07-20 18:16:11 +02:00
Christian Kamm
feaefc3314 Better error handling for CMake LLVM config file detection. 2009-07-03 18:49:42 +02:00
Christian Kamm
151e266deb Yet another fix for finding llvm's config file.
Since llvm-config --includedir sometimes includes the trailing llvm/ and
sometimes it doesn't, we just check both directories.
2009-06-30 22:07:50 +02:00
Christian Kamm
81e0b81e10 LLVM_INSTDIR -> LLVM_INCLUDEDIR fix by d0k. 2009-06-29 21:44:11 +02:00
Christian Kamm
88f6e9e83a Initialize LLVM target and asmprinter for the native and extra targets.
Uses some CMake hackery to get the native LLVM target name, since it only
provides a conveniance function for initializing the native target and not the
native asmprinter.
2009-06-26 21:02:23 +02:00
Robert Clipsham
91ddf6140a More tweaks. 2009-06-01 18:58:21 +01:00
Frits van Bommel
727e8f0dfb Install ldmd too. 2009-05-19 16:40:37 +02:00
Frits van Bommel
0df1e34eb2 Implement first D-specific optimization pass: -simplify-drtcalls.
It uses the machinery of the standard -simplify-libcalls pass, but optimizes
calls to the D runtime instead of calls to C libraries.

At the moment, these optimizations are implemented by this pass:
 - Avoid the runtime call for `arr.length = newlen` if it can determine that
   the new length isn't longer than the old one.
 - Ditto for `cast(T[]) arr` if it will clearly always succeed.
   (e.g. if the length of the original array is zero, or if the old element
   size is a multiple of the new element size)
2009-04-28 21:58:06 +02:00
Kelly Wilson
5c4455a394 Change needed for mingw 2009-04-22 14:40:56 -06:00
Tomas Lindquist Olsen
57bf95cb42 Moved some DMDFE files into a seperate dmd/root subdir to closer match the DMD file structure since 1.041. 2009-04-03 17:02:52 +02:00
Tomas Lindquist Olsen
187e3c926e Fixed error when pkg-config couldn't find libconfig, allows user to set flags manually. 2009-03-24 18:22:29 +01:00
Christian Kamm
490549e65c Add dmd-style configuration file for rebuild usage. See #236 and thanks to ccuter for the patch! 2009-03-21 09:47:48 +01:00
Frits van Bommel
ad46ec8bd0 Split out LLVM_REV into separate header, to reduce rebuilding when only the LDC
revision has changed.
2009-03-13 16:18:43 +01:00
Frits van Bommel
3fe4cfb0fa Unquote ${LIBCONFIG_LDFLAGS} in target_link_libraries().
Without this change, LDC fails to link for me.
2009-03-12 23:30:58 +01:00
Tomas Lindquist Olsen
269e37dc88 - Fixed building tango-user-ldc on x86-32.
- Added CMake option for extra LLVM components to be linked in.
2009-03-12 22:30:30 +01:00
Tomas Lindquist Olsen
8b751cce0e - Updated to DMD frontend 1.041.
- Removed dmd/inifile.c , it's not under a free license, replaced with libconfig based config file.
2009-03-12 20:37:27 +01:00
Frits van Bommel
a2bb3ce6a2 Make sure revisions.pl always runs so revisions.h doesn't get out of date. 2009-03-09 16:25:45 +01:00
Christian Kamm
c5c0a01044 Fix out of source build by adding the build dir to the include path. 2009-03-08 17:57:34 +01:00
Frits van Bommel
958ad381db Fix to make sure to create gen/ in build dir and unbreak build with older perl 2009-03-08 16:37:55 +01:00
Frits van Bommel
622a93a810 Make LDC work with LLVM trunk (s/LinkOnceLinkage/LinkOnceOdrLinkage/)
Also moved the #defines for linkage types into a separate header instead of
mars.h so we can #include revisions.h without having to rebuild the entire
frontend every time we update.
(I'm using revisions.h to get the LLVM revision for use in preprocessor
conditionals. It should work with LLVM release 2.5, old trunk and new trunk)
2009-03-08 16:13:10 +01:00
Christian Kamm
ed9591d81f Make IrFuncTy a member of TypeFunction. Reset between modules compiled in the
same LDC call.
2009-03-07 14:25:30 +01:00
Christian Kamm
9433028acd Remove unused defines: X86_REVERSE_PARAMS, X86_PASS_IN_EAX 2009-03-03 17:38:08 +01:00
Tomas Lindquist Olsen
a71b028a0f Implemented basic -m32 and -m64 options. 2009-03-01 22:27:03 +01:00
Frits van Bommel
bfacf4477c Add explicit paths to revisions.* to unbreak out-of-source build. 2009-02-19 00:50:35 +01:00