Commit Graph

435 Commits

Author SHA1 Message Date
Chris Lattner 4a48245919 Profile builds should always have debug info enabled.
llvm-svn: 29109
2006-07-11 18:33:50 +00:00
Chris Lattner 65e28b3186 Allow specifying an explicit list of architectures to build for, e.g.:
make ENABLE_OPTIMIZED=1 UNIVERSAL=1 UNIVERSAL_ARCH="i386 ppc ppc64"

retain the default of building for just i386/ppc.

llvm-svn: 28985
2006-06-29 19:38:04 +00:00
Chris Lattner 161a84ebeb Add targets for generating .s file in addition to .o files.
llvm-svn: 28903
2006-06-21 21:01:20 +00:00
Chris Lattner 085c7153da Factor a bunch of rules together, no functionality change.
llvm-svn: 28902
2006-06-21 20:58:03 +00:00
Evan Cheng 9e7e4b5d85 Allow LLVM to be built with extra options.
llvm-svn: 28873
2006-06-20 18:50:48 +00:00
Chris Lattner 64e85f309f Do not hardcode random paths into the makefile. Make the user specify the
SDK to use when building "universal" on Mac OS/X, if they want to use a
specific one.

llvm-svn: 28842
2006-06-16 21:47:59 +00:00
Chris Lattner 3743bd84cd Fix building on case-sensitive file systems, grr :)
llvm-svn: 28801
2006-06-15 17:31:22 +00:00
Chris Lattner 4d1eeb48e0 Remove obsolete CORE_IS_ARCHIVE stuff.
llvm-svn: 28648
2006-06-02 00:27:42 +00:00
Reid Spencer 187b4adcfe Provide configuration support and usage for MINGW32 platform
llvm-svn: 28639
2006-06-01 19:03:21 +00:00
Reid Spencer a62f097c96 For PR786:
Turn -pedantic and -Wno-long-long compile flags on by default. In a few
places, avoid the warnings by removing these options in the local makefile.
One notable exception: lib/Target/CBackend/Writer.cpp. These warnings are
left on as a reminder to developers to clean them up.

llvm-svn: 28614
2006-06-01 01:55:21 +00:00
Reid Spencer a647c7ff42 Use archive libraries instead of object files for VMCore, BCReader,
BCWriter, and bzip2 libraries. Adjust the various makefiles to accommodate
these changes. This was done to speed up link times.

llvm-svn: 28610
2006-06-01 01:30:27 +00:00
Chris Lattner 11c25cfa13 Enable -fno-use-cxa-atexit on darwin/ppc also.
llvm-svn: 28558
2006-05-30 16:38:06 +00:00
Chris Lattner 213a85b43c Abstract out the current optimization level into a flag that can be overridden
on the make line, to avoid bugs in native compilers.

llvm-svn: 28457
2006-05-24 23:02:40 +00:00
Chris Lattner d36c0fdf2e Remove flags implied by -O3
llvm-svn: 28456
2006-05-24 22:59:07 +00:00
Chris Lattner 040c110569 Don't use -fomit-frame-pointer on darwin, it breaks stacktrace collection.
llvm-svn: 28451
2006-05-24 18:34:08 +00:00
Reid Spencer a22a5b382f Make some changes suggested by Chris:
1. Remove the LLVM_DO_NOT_BUILD feature (not needed any more)
2. Ensure that lib/VMCore gets built first. This needs to be done because
   VMCore now uses tblgen to generate the Intrinsics header which are
   needed in other libraries. In parallel builds, this can cause problems.

llvm-svn: 28374
2006-05-17 22:55:35 +00:00
Reid Spencer 540c1b95f1 Make sure that $(CXX.Flags) is passed to the linker so that the same options
with which source is compiled are used when linking. This matters when a
project is using the LLVM makefiles and overrides CXXFLAGS to specify new
flags to use.

llvm-svn: 28322
2006-05-16 06:51:02 +00:00
Vladimir Prus 788db2c812 Replace "../whatever.td" with "whatever.td", so that out-of-tree backends
can just add lib/Target to TableGen includes.

llvm-svn: 28318
2006-05-16 06:39:36 +00:00
Reid Spencer 1053658517 When linking, make sure the project libraries are linked before the LLVM
libraries. This ensures that the project's libraries (which most likely
depend on LLVM libraries) come first on the command line and can thus be
resolved by the LLVM libraries that appear later.

llvm-svn: 28316
2006-05-16 06:25:14 +00:00
Owen Anderson 68afff2dcd Fix some problems linking stuff in libTarget.
llvm-svn: 28218
2006-05-11 03:10:15 +00:00
Reid Spencer 9597684ba7 Remove traces of Burg utility now that its gone and not needed.
llvm-svn: 27902
2006-04-20 18:42:24 +00:00
Chris Lattner d5737be0f0 Remove V9 jit support
llvm-svn: 27891
2006-04-20 17:52:00 +00:00
Chris Lattner f2f4aedc6e Final piece to get relinked .o files buildable universal on Darwin.
llvm-svn: 27839
2006-04-19 18:45:29 +00:00
Reid Spencer 78ede56ed0 Make sure that the C Frontend's runtime library directory is included as
a -L option to gccld whenever we're building a bytecode module or archive.
This gets around the "Cannot find library 'crtend'" warning messages.

llvm-svn: 27621
2006-04-12 18:21:35 +00:00
Reid Spencer ca4abfe3db Remove extraneous building in target dist-check. There is no reason that
a distribution should need to be able to make a distribution so eliminate
the "make dist" from the list of targets attempted.

llvm-svn: 27600
2006-04-12 03:07:02 +00:00
Reid Spencer 15b8509c11 ENABLE_ASSERTIONS -> DISABLE_ASSERTIONS
llvm-svn: 27558
2006-04-10 16:46:04 +00:00
Reid Spencer ece1358c80 Check for DISABLE_ASSERTIONS, not ENABLE_ASSERTIONS
llvm-svn: 27552
2006-04-09 23:41:14 +00:00
Reid Spencer 056f022569 For PR723:
1. Don't force debug builds to have assertion checking turned on always.
   Let the default (on) be taken, or overridden by the command line
2. Create two new BuildModes based on assertion checking: Release+Assert
   and Debug-Assert.
3. Ensure that when building a distribution we get a release build with
   assertions enabled, regardless of the tree's configuration.
4. (unrelated) Fix library name generation for llvm-config usage.

llvm-svn: 27488
2006-04-07 16:06:18 +00:00
Evan Cheng bb66ec263c A saner workaround. I hope.
llvm-svn: 27483
2006-04-07 08:31:56 +00:00
Evan Cheng 1e86e679a5 Temporary workaround for a Mac OSX specific issue.
llvm-svn: 27482
2006-04-07 08:10:09 +00:00
Chris Lattner d81eba56d7 Add support for building the LLVM libraries and tools as a Mac OS/X
universal binary, by specifying UNIVERSAL=1 on the make command line.

llvm-svn: 27447
2006-04-06 06:30:15 +00:00
Reid Spencer d813b95fc3 Add a facility for invoking the llvm-config tool when linking a program.
This facility allows LLVMLIBS to be specified with something like:
LLVMLIBS = config --libs jit
instead of:
LLVMLIBS = JIT
with the same effect. However, the llvm-config utility is much more versatile
than the single keyword approach. Note that "config" is the keyword after
which any arguments to llvm-config are allowed. When llvm-config is tested
and working well, we'll start using this and drop support for the JIT
keyword.

llvm-svn: 27057
2006-03-24 07:36:57 +00:00
Reid Spencer 6f682b79af These changes are necessary to support the new llvm-config tool. llvm-config
is a handy tool for users of LLVM who want to be able to quickly get
information about LLVM's configuration. It is intended to be used in the
command line of other tools. Documentation will be forthcoming in a
subsequent patch.

llvm-svn: 26952
2006-03-22 15:59:55 +00:00
Chris Lattner 98c79c34ef Enable assertions to be enabled in release builds by building with
make ENABLE_OPTIMIZED=1 ENABLE_ASSERTIONS=1

llvm-svn: 26914
2006-03-21 01:06:41 +00:00
Chris Lattner 35ac761341 reorder these to make it work with static libraries
llvm-svn: 26698
2006-03-10 21:01:34 +00:00
Chris Lattner 5b59d7cb11 Use $(Verb) instead of @ so that VERBOSE=1 will print these.
llvm-svn: 26626
2006-03-09 06:00:05 +00:00
Chris Lattner 8a87f5fb18 pass -Illvm/include to tblgen
llvm-svn: 26489
2006-03-03 01:54:54 +00:00
Chris Lattner c1fa889cde 8 spaces -> tab. Reported by Wink Saville
llvm-svn: 26425
2006-02-28 19:12:58 +00:00
Chris Lattner 1e6128254c Fix a minor makefile bug with lex/yacc handling that nate noticed. We don't
want to copy the files when the .cpp file changes, we want to copy them
to the .cvs versions when the .l/.y file change (like the comments even say).
This avoids having bogus changes show up in diffs.

llvm-svn: 26229
2006-02-16 05:10:48 +00:00
Chris Lattner b0240b2f4a bugfixes
llvm-svn: 26207
2006-02-15 07:23:05 +00:00
Chris Lattner c38a9755f1 Convert the bison-output-checked-into-cvs makefile handling stuff to work
like the flex stuff, which actually works when people do cvs updates and
get conflicts in the updated checked in file.

llvm-svn: 26205
2006-02-15 07:16:57 +00:00
Duraid Madina cbbc184a2e HP aCC (and a bunch of other compilers, no doubt) don't share
GCC's syntax for auto-dependency generation stuff. This should
be changed to be disabling dependency stuff unless GCC/ICC is
found.

llvm-svn: 26201
2006-02-15 03:23:26 +00:00
Duraid Madina 1f898afd3d oops, I meant this
llvm-svn: 26200
2006-02-15 03:20:16 +00:00
Chris Lattner 8104b4c352 Implement an alternative way of handling generated lex files in CVS. This
should solve the "updating cvs when .l files change give me conflict markers
that break my build" issue.

llvm-svn: 26160
2006-02-14 05:12:00 +00:00
Chris Lattner b8e7aa0c9b Wrap a couple more long lines
llvm-svn: 26159
2006-02-14 04:27:15 +00:00
Chris Lattner e2dcbe03a1 wrap long lines
llvm-svn: 26158
2006-02-14 04:25:54 +00:00
Chris Lattner b3eb31f7f9 * Eliminate FAKE_SOURCES
* Make runtimes and projects build with the new front-end by not relying on
  'llvm-gcc -c' to build a .bc file.  Instead, use llvm-gcc -S -emit-llvm,
  then an explicit invocation of gccas.  Also, don't use llvm-gcc to link
  .bc files together, use gccld directly.

llvm-svn: 25707
2006-01-27 22:13:12 +00:00
Reid Spencer 528c980493 For PR625:
Don't install contents of CVS directories and don't double install when
srcdir == objdir.

llvm-svn: 24998
2005-12-23 22:27:56 +00:00
Reid Spencer c49a8637c3 Some simple cleanups:
1. When srcdir == objdir have "spotless" say that it isn't supported in
   that mode rather than just let make say "no such target"
2. Minor doc cleanups
3. Fix the double rebuild problem with yacc files. A missing dependency
   caused parallel builds to skip building the .cpp file after the .cpp
   file was regenerated by bison.

llvm-svn: 24924
2005-12-21 23:17:06 +00:00
Reid Spencer 3f31cc4dcd Implement fix for PR471:
* Add --enable-debug-runtime option, defaults to disabled
* Pass the new config var, DEBUG_RUNTIME, to Makefiles
* Don't use -Wa,-strip-debug if debug-runtime is enabled

llvm-svn: 24891
2005-12-21 03:31:53 +00:00
John Criswell fe5f33b120 Move some constant folding code shared by Analysis and Transform passes
into the LLVMAnalysis library.
This allows LLVMTranform and LLVMTransformUtils to be archives and linked
with LLVMAnalysis.a, which provides any missing definitions.

llvm-svn: 24036
2005-10-27 15:54:34 +00:00
John Criswell 94b7bea733 1. Remove libraries no longer created from the list of libraries linked into the
SparcV9 JIT.
2. Make LLVMTransformUtils a relinked object file and always link it before
   LLVMAnalysis.a.  These two libraries have circular dependencies on each
   other which creates problem when building the SparcV9 JIT.  This change
   fixes the dependency on all platforms problems with a minimum of fuss.

llvm-svn: 24023
2005-10-26 20:35:13 +00:00
Chris Lattner 768e272abd analyses after transformations
llvm-svn: 23977
2005-10-25 17:54:19 +00:00
Chris Lattner 1b91cbd627 Now that all libraries are built in either .o or .a form, make BUILD_ARCHIVE
default to turning off building of relinked objects.

llvm-svn: 23939
2005-10-24 02:21:45 +00:00
Chris Lattner 8788942988 pull in the .a version of scalaropts lib to reduce the size of programs
using the JIT

llvm-svn: 23930
2005-10-24 01:15:14 +00:00
Jeff Cohen 8b7b47ca88 Remove redundant flag.
llvm-svn: 23889
2005-10-23 04:51:22 +00:00
Jeff Cohen 11e26b52b2 When a function takes a variable number of pointer arguments, with a zero
pointer marking the end of the list, the zero *must* be cast to the pointer
type.  An un-cast zero is a 32-bit int, and at least on x86_64, gcc will
not extend the zero to 64 bits, thus allowing the upper 32 bits to be
random junk.

The new END_WITH_NULL macro may be used to annotate a such a function
so that GCC (version 4 or newer) will detect the use of un-casted zero
at compile time.

llvm-svn: 23888
2005-10-23 04:37:20 +00:00
Jim Laskey 9ed9032e22 Plugin new subtarget backend into the build.
llvm-svn: 23870
2005-10-21 19:05:19 +00:00
Chris Lattner 95866d3923 Make sure targets depend on TargetSelectionDAG.td
llvm-svn: 23732
2005-10-14 06:31:58 +00:00
Chris Lattner bb08795695 Add some rules for building preprocessed files
llvm-svn: 23629
2005-10-05 00:28:41 +00:00
Chris Lattner 33f98bdddf allow for a target to ask for a dag isel
llvm-svn: 23237
2005-09-03 01:15:25 +00:00
Reid Spencer dfb3fb4a25 Implement PR614:
These changes modify the makefiles so that the output of flex and bison are
placed in the SRC directory, not the OBJ directory. It is intended that they
be checked in as any other LLVM source so that platforms without convenient
access to flex/bison can be compiled. From now on, if you change a .y or
.l file you *must* also commit the generated .cpp and .h files.

llvm-svn: 23115
2005-08-27 18:50:39 +00:00
Reid Spencer 53846bcdb6 For PR614:
Move the implementation of the fix from Makefile.rules to Makefile. This
ensures that it is only checked on a top-level rebuild, and not in every
single subdirectory. This removes some annoying messages from the build and
numerous executions of config.status if the .in file changes but not
substantively enough to cause the .h file to be modified by config.status.

llvm-svn: 23039
2005-08-25 04:59:49 +00:00
Reid Spencer 83bde55c64 Don't attempt to update LLVM configured header files from a build in a
project. Thanks to Chris for pointing out this deficiency.

llvm-svn: 23037
2005-08-25 04:44:18 +00:00
Reid Spencer bfb0c16606 Whoops, don't use PROJ variables, these are all LLVM headers. This allows
projects to compile properly.

llvm-svn: 23007
2005-08-24 10:55:07 +00:00
Reid Spencer b48e3f8b74 For PR619:
Make any header files that are automatically generated be preconditions of
the compilation. This ensures that if a *.h.in file is changed then its
corresponding *.h file gets updated on the next rebuild. Note that this can
lead to confusing (but correct) results if the *.h.in file changed
unsubstantially so that autoheader doesn't update the *.h file. In that case,
manually touch the *.h file in question to restore order. Moral of the story,
if you're going to "touch" a *.in file then modify it substantially.

llvm-svn: 23006
2005-08-24 10:43:10 +00:00
Misha Brukman 5fbf58a7b0 Fix grammar
llvm-svn: 22821
2005-08-17 02:38:56 +00:00
Andrew Lenharth 6b62b479fa Fix oversized GOT problem with gcc-4 on alpha
llvm-svn: 22777
2005-08-13 05:09:50 +00:00
Misha Brukman 08c3645d3a No, really, it's an Alpha! And you probably thought it was a PowerPC.
llvm-svn: 22506
2005-07-22 22:43:40 +00:00
Andrew Lenharth 9900701f19 I know PowerPC wishes it could be alpha, but it cannot. so there
llvm-svn: 22504
2005-07-22 22:00:24 +00:00
Andrew Lenharth c7fe0f510f Alpha has JIT
llvm-svn: 22501
2005-07-22 20:54:01 +00:00
Reid Spencer 13f5193ff7 Two dist-check related changes:
1. Allow DIST_CHECK_CONFIG_OPTION to specify a set of options to be passed
   to the configure script during the dist-check target. This allows things
   to be passed down on a project basis so the configure doesn't fail.

2. Use the tar | (cd ; tar ) idiom to copy files which is more flexible
   than using the cp command. THis allows us to exclude CVS .svn
   directories at source rather than stripping them out of the tar ball.

llvm-svn: 22166
2005-05-24 02:33:20 +00:00
Reid Spencer 98a2d980ee Make sure that tool names don't have any leading or trailing spaces in them.
If they do, it screws up the concatenation of the .exe suffix on cygwin.

llvm-svn: 22141
2005-05-19 21:03:11 +00:00
Reid Spencer 90b689d943 Build the install directories just exactly as any others. Hopefully this
helps out cygwin build.

llvm-svn: 22140
2005-05-19 20:26:14 +00:00
Reid Spencer a80f16710f Two changes to support building shared libraries that contain multiple
llvm archive or re-linked libraries:
1. Permit the "JIT" special keyword on LLVMLIBS to be recognized when
   building a library, not just for building tools
2. If LINK_LIBS_IN_SHARED is set, the LLVMLIBS and USEDLIBS can be specified
   when linking a shared library and the libraries listed will be
   incorported into the shared library. THis is only used when the
   SHARED_LIBRARY variable is set.

llvm-svn: 22127
2005-05-19 00:37:31 +00:00
Duraid Madina 60c9a3c171 hp-ux needs this to get through the System/Support libs
llvm-svn: 22078
2005-05-16 06:38:09 +00:00
Reid Spencer 83745dda88 * Make some warning messages stand out a bit by putting **** at the end
* Fix a typo that prevents BuildMode from being printed

llvm-svn: 21954
2005-05-13 18:32:54 +00:00
Misha Brukman 9d72af0489 * Remove extraneous spaces
* Convert some tabs to spaces

llvm-svn: 20560
2005-03-11 04:15:18 +00:00
Nate Begeman 5f399bb2fe Add SelectionDAG library to PPC JIT so that lli will link when
PPC32ISelPattern.cpp is present.

llvm-svn: 20559
2005-03-11 03:58:53 +00:00
Reid Spencer fefb9ea94d Correct a typo in Makefile.rules.
Patch idea contributed by Vladimir Merzliakov.

llvm-svn: 20384
2005-03-01 16:27:06 +00:00
Alkis Evlogimenos 24340589c0 Add llc to tools.
llvm-svn: 20345
2005-02-27 10:21:37 +00:00
Reid Spencer dcc5375d49 Don't try to strip bytecode files!
llvm-svn: 20320
2005-02-24 21:36:32 +00:00
Reid Spencer d77a4c0660 The install program doesn't know how to strip bytecode files so install
bytecode as data, not program.

llvm-svn: 20319
2005-02-24 21:30:37 +00:00
Reid Spencer 247a10e729 Fix the other half of PR528 .. don't try to strip header files!
llvm-svn: 20301
2005-02-24 07:12:43 +00:00
Reid Spencer c43b1d403e For PR528:
* Consolidate all "install" usage to the install program/script found by
  autoconf which includes the autoconf/install-sh script if necessary
* Change Makefile.rules to not use the -D flag to install but use the
  MKDIR command as necessary.
* Change Makefile.rules to differentiate between installation of executable
  files and regular data files to get the permission modes correct.

llvm-svn: 20294
2005-02-24 03:56:32 +00:00
Reid Spencer e386b72d21 Fix installation of configuration files.
llvm-svn: 20215
2005-02-16 16:17:11 +00:00
Reid Spencer fe0a01ee25 * Don't flatten the directory hierarchy when installing headers
* Make it possible to have the Install program run in verbose mode when
  the TOOL_VERBOSE=1 option is set
* Ensure non-executable installed files do not install with execute perms.

llvm-svn: 20214
2005-02-16 16:13:02 +00:00
Reid Spencer 48a82f49bd Don't use pax for installing header files. Use the install program instead.
llvm-svn: 20213
2005-02-16 15:54:03 +00:00
Reid Spencer e9fa5444c5 For PR496:
When llvm-gcc is not available, bypass rules for Modules and Bytecode
Libraries that require llvm-gcc and emit instead a warning that llvm-gcc
is not available. This permits "make LLVMGCC=" to build LLVM completely
without error and provides warnings about the modules and bc libs that
could not be constructed.

llvm-svn: 20185
2005-02-14 21:54:08 +00:00
Andrew Lenharth 9a98def106 non-ieee arith crashes passes on alpha
llvm-svn: 20144
2005-02-13 03:41:10 +00:00
Chris Lattner 81bfc9eda8 Fix installation of configured headers when objdir != srcdir. Patch
contributed by Vladimir Merzliakov!

llvm-svn: 20084
2005-02-09 02:24:00 +00:00
Chris Lattner f60c170ea5 Add support for .cc and .hpp files. Patch contributed by Vladimir Merzliakov!
llvm-svn: 20042
2005-02-04 21:28:50 +00:00
Alkis Evlogimenos 7c04a3ddb6 Add variable for bugpoint.
llvm-svn: 19981
2005-02-02 00:40:15 +00:00
Reid Spencer 3a46875e54 Fix some typos in the Makefile.rules.
Patch contributed by Vladimer Merzliakov.

llvm-svn: 19877
2005-01-28 19:52:32 +00:00
Reid Spencer ba6a3dbd2d Several changes:
* Rename BUILD_* to PROJ_*
* Differentiate between LLVM's Makefile.conf and the project's
* Use project specific install locations

llvm-svn: 19590
2005-01-16 02:20:54 +00:00
Reid Spencer b12e290f8a Allow the Echo and EchoCmd variables to be overridden.
llvm-svn: 19551
2005-01-14 16:33:36 +00:00
Reid Spencer 87e645c5bd Implement the LOADABLE_MODULE option when building a shared library. This
passes the -module option on the libtool command line to ensure that the
shared library being built can be dlopened and dlsym can work on that
module. LOADABLE_MODULE should be sent only in conjunction with the
SHARED_LIBRARY directive. It should generally be used for any module that
is intended to be the target of an LLVM -load option. Note that loadable
modules will not have the lib prefix but otherwise look like shared
libraries. This is per the libtool recommendations and prevents these
special shared libraries from being linked in via -l option to the linker.

llvm-svn: 19454
2005-01-11 04:31:07 +00:00
Chris Lattner 28ce94ce85 X86 JIT requires the selection dag library.
llvm-svn: 19336
2005-01-07 07:51:11 +00:00
John Criswell dc6650136a Quote the paths and not the assignment of the PATH variable.
This seems to make things happier.

llvm-svn: 19276
2005-01-03 17:42:57 +00:00
John Criswell 34f603fcd7 Joining the quote fray...
Reverting the quote patch.  For some reason, this breaks the building of
llvm/runtime (the shell doesn't like it for some reason).  I might play
with it to see if I can get the quotes done in such a way that the shell
like it, but no promises.

llvm-svn: 19275
2005-01-03 17:41:56 +00:00