Commit Graph

65 Commits

Author SHA1 Message Date
Eric Fiselier d2852b69ce [libcxx] Move to using libc++abi2.exp as the default symbol list for libc++
Summary:
libc++abi2.exp should be used whenever `cxxabi.h` defines `_LIBCPPABI_VERSION`. This macro was added to libc++abi in 2012 in r149632. For this reason we should use libc++abi2.exp as default unless otherwise specified.

Also when building against an in-tree libc++abi we definitely want to use libc++abi2.exp.

I would love to know what OSX was the last to use libc++abi.exp but I can only test on 10.9.


Reviewers: danalbert, mclow.lists, EricWF

Reviewed By: EricWF

Subscribers: meadori, cfe-commits

Differential Revision: http://reviews.llvm.org/D7773

llvm-svn: 230119
2015-02-21 02:26:24 +00:00
Chandler Carruth 64be05a873 [cmake/multilib] Teach libc++'s CMake build to support multilib libdir
suffixes like 'lib64' or 'lib32'.

This support is currently very rhudimentary. We define a variable
LIBCXX_LIBDIR_SUFFIX. In a standalone build of libc++ this can be
directly set as a cached variable to control the multilib suffix used.
When building libc++ within a larger LLVM build, it is hard wired to
whatever LLVM libdir suffix has been selected. If this doesn't work for
someone, just let me know. I'm happy to change it.

This is essentially new functionality for libc++ so I don't expect it to
have any impact for folks until they start setting these variables.
However, I know libc++ is built in a diverse set of environments so just
let me know if this causes you any problems.

llvm-svn: 224926
2014-12-29 12:15:47 +00:00
Eric Fiselier 53deb607d9 Fixes to get libc++ building on sun solaris. Patch from C Bergstrom.
llvm-svn: 222794
2014-11-25 21:57:41 +00:00
Eric Fiselier 5aedca96d5 [libcxx] Refactor CMakeLists.txt handling of compile and link flags to suppress warnings.
Summary:
Currently we have 5 variables that are used to specify options for building libcxx
1. `LIBCXX_CXX_FEATURE_FLAGS`
2. `LIBCXX_CXX_WARNING_FLAGS`
3. `LIBCXX_CXX_REQUIRED_FLAGS`
4. `compile_flags` (in libcxx/lib)
5. `link_flags` (in libcxx/lib)

The first three all get put into `CMAKE_CXX_FLAGS`. 
This changes the way flags are handled by only using 3 different options:

1. `LIBCXX_CXX_FLAGS` - general compile and link flags.
2. `LIBCXX_COMPILE_FLAGS` - compile only flags.
3. `LIBCXX_LINK_FLAGS` - link only flags.

This patch also removes the warning about `-nostdinc++` being unused during linking.



Reviewers: mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D6277

llvm-svn: 222080
2014-11-15 06:26:30 +00:00
Eric Fiselier a63c149ceb [libcxx] Redo adding support for building and testing with an ABI library not along linker paths
Summary:
This is the second attempt at allowing for the use of libraries that the linker cannot find. The first attempt used `CMAKE_LIBRARY_PATH` and `find_library` to select which ABI library should be used. There were a number of problems with this approach:

- `find_library` didn't work with cmake targets (ie in-tree libcxxabi build)
- It wasn't always possible to determine where `find_library` actually found your library.
- `target_link_libraries` inserted the path of the ABI library into libc++'s RPATH when `find_library` was used.
- Linking libc++ and it's ABI library is a special case. It's a lot easier to keep it simple. 

After discussion with @cbergstrum a new approach was decided upon.
This patch achieve the same ends by simply using `LIBCXX_CXX_ABI_LIBRARY_PATH` to specify where to find the library (if the linker won't find it). When this variable is defined it is simply added as a library search path when linking libc++. It is a lot easier to duplicate this behavior in LIT. It also prevents libc++ from being linked with an RPATH.






Reviewers: mclow.lists, cbergstrom, chandlerc, danalbert

Reviewed By: chandlerc, danalbert

Subscribers: chandlerc, cfe-commits

Differential Revision: http://reviews.llvm.org/D5860

llvm-svn: 220157
2014-10-19 00:42:41 +00:00
Hans Wennborg 4714826262 [libc++] Fix the CMake build on Mac when setting MACOSX_DEPLOYMENT_TARGET=10.6
The build file was trying to use LIBCXX_VERSION, which isn't set
anywhere, and also forgot to split the 'compile_flags' list.

Differential Revision: http://reviews.llvm.org/D4860

llvm-svn: 215463
2014-08-12 17:32:07 +00:00
Dan Albert b9dbbba6cb Obey LLVM_LIBDIR_SUFFIX.
llvm-svn: 214726
2014-08-04 16:13:32 +00:00
David Fang ed7987dcfe eliminate install of duplicate headers (take 2)
Patch by Ryuta Suzuki

llvm-svn: 211629
2014-06-24 20:32:11 +00:00
Joerg Sonnenberger 71e07d7175 Not everyone uses bash, so fix test syntax.
llvm-svn: 206118
2014-04-12 21:12:55 +00:00
Marshall Clow b183f8594f Whoops! Set the default in the last commit to c++1y instead of c++11
llvm-svn: 199224
2014-01-14 17:04:06 +00:00
Marshall Clow 4cdc6feb4f Update lib/buildit and test/testit to both pay attention to an env flag CXX_LANG, which people can set to 'c++03', 'c++11' or 'c++1y' to build/test using that language variant. If you don't set this env variable, you get c++11, just like today. Drive-by fix; remove duplicate -nostdinc++.
llvm-svn: 199222
2014-01-14 17:00:40 +00:00
Howard Hinnant 6a0d6cea40 Justin Bogner: This makes the headers available in the build directory, making it
easier to use freshly-built clang with freshly-built libc++.

Basically, this makes it possible to run clang with libc++ without
having to install it, even if you don't have any version of libc++
installed in /usr/

llvm-svn: 194825
2013-11-15 17:18:57 +00:00
Howard Hinnant 68a2610520 G M: Remove unneeded warnings in buildit that are hindering porting.
llvm-svn: 192012
2013-10-05 00:13:31 +00:00
Michael Gottesman b422ecc7de [cmake] Provide an option to not install the support headers so that the cmake build can match the make build if requested.
llvm-svn: 189739
2013-09-02 07:28:05 +00:00
Michael Gottesman 05c4b550c9 [cmake] Make libcxx standalone compile on Mac OS X.
llvm-svn: 189738
2013-09-02 07:28:03 +00:00
Howard Hinnant 5d1a701d6d Xing Xue: port to IBM XLC++/AIX.
llvm-svn: 188396
2013-08-14 18:00:20 +00:00
Howard Hinnant 307f814372 Implement full support for non-pointer types in custom allocators. This is for the unordered containers only. This work still needs to be done on the sequence containers.
llvm-svn: 184635
2013-06-22 15:21:29 +00:00
Howard Hinnant c5894133bc Added extra space to end of EXTRA_FLAGS in buildit. This fixes http://llvm.org/bugs/show_bug.cgi?id=15761
llvm-svn: 179609
2013-04-16 17:34:20 +00:00
Daniel Dunbar bdd4ec71db [build/Darwin] Use the correct libc++abi reexport list.
- This updates the build script to match the change originally in r149634, so
   that we re-export symbols from libc++abi appropriately.

llvm-svn: 174563
2013-02-07 00:24:19 +00:00
Daniel Dunbar 6bd3374de2 [build] Detabify.
llvm-svn: 174562
2013-02-07 00:24:17 +00:00
Daniel Dunbar 76ff8b54b3 [build] Create the link for the final library install name in the lib dir.
- Otherwise, we never were actually linking against the right library when
   building the test applications.

llvm-svn: 174470
2013-02-06 00:04:54 +00:00
Michael J. Spencer bb8cfd0fec [CMake] Fix c++ abi library configuration on Linux.
You can now configure from the command line using:
-DLIBCXX_CXX_ABI=libsupc++
-DLIBCXX_LIBSUPCXX_INCLUDE_PATHS="path;path

Also documents how to build on Linux.

llvm-svn: 171316
2012-12-31 19:34:21 +00:00
Michael J. Spencer 299fc29a59 [CMake] Add support for selecting which c++ abi library to use.
llvm-svn: 169036
2012-11-30 21:02:29 +00:00
Howard Hinnant b2f52bb982 Allow libc++ to be built with CMake from within the LLVM tree. The libc++ part is just some renaming as the variable was already in use, conflicting with something else in the LLVM tree. Contributed by Ruben Van Boxem.
llvm-svn: 153036
2012-03-19 15:40:23 +00:00
Howard Hinnant 908d2bebaf At least temporarily move operator new/delete from the abi back to here. I'm having trouble reexporting it as a weak symbol.
llvm-svn: 151459
2012-02-25 21:36:01 +00:00
Howard Hinnant 25326f060d ReExport some mor symbols from libc++abi.
llvm-svn: 151453
2012-02-25 20:25:07 +00:00
Howard Hinnant f95d9f0a3a Move typeinfos for exceptions in <stdexcept> to the abi
llvm-svn: 150835
2012-02-17 19:24:42 +00:00
Howard Hinnant b8be700974 Added some more symbols to the v2 rexport list.
llvm-svn: 149636
2012-02-02 22:01:34 +00:00
Howard Hinnant 2c9c6a579a Prepare for running on top of new libc++abi.
llvm-svn: 149634
2012-02-02 20:48:35 +00:00
Howard Hinnant c206366fd7 Quash a whole bunch of warnings
llvm-svn: 145624
2011-12-01 20:21:04 +00:00
Howard Hinnant 03a466b3b9 Remove -Wglobal-constructors from flags. This was an accidental addition.
llvm-svn: 141551
2011-10-10 17:36:59 +00:00
Howard Hinnant b5a46edf35 reverting change to compatibility_version
llvm-svn: 141445
2011-10-07 23:55:11 +00:00
Howard Hinnant e5bb431d3f Change compatibility_version
llvm-svn: 141391
2011-10-07 19:52:29 +00:00
Howard Hinnant 7ba069074a Fix <rdar://problem/10136825>
llvm-svn: 141132
2011-10-04 23:11:56 +00:00
Howard Hinnant 3438889dec Work on Windows port by Ruben Van Boxem
llvm-svn: 140728
2011-09-28 21:39:20 +00:00
Howard Hinnant 3c78ca07bc Partial Windows port by Ruben Van Boxem
llvm-svn: 140328
2011-09-22 19:10:18 +00:00
Nick Kledzik 50aab549c0 more Apple build system tweaks
llvm-svn: 132819
2011-06-09 23:31:35 +00:00
Howard Hinnant 28d55e0745 http://llvm.org/bugs/show_bug.cgi?id=10045 . Please review, I have not tested this on linux.
llvm-svn: 132287
2011-05-29 13:57:49 +00:00
Nick Kledzik bc6191fba9 support another Apple build environment
llvm-svn: 131996
2011-05-24 20:27:31 +00:00
Nick Kledzik 664c0da5d8 on Darwin re-export C++0x type infos
llvm-svn: 131995
2011-05-24 20:26:04 +00:00
Howard Hinnant cf76200bd3 http://llvm.org/bugs/show_bug.cgi?id=9399 fixed by Ryuta Suzuki
llvm-svn: 131961
2011-05-24 12:54:00 +00:00
Nick Kledzik f9ad245c90 change RC_BUILDIT to RC_XBS for detecting Apple build environment
llvm-svn: 130970
2011-05-06 01:13:20 +00:00
Nick Kledzik 7db91cefb2 add support for setjmp/longjmp based exceptions
llvm-svn: 130938
2011-05-05 18:45:41 +00:00
Nick Kledzik de214e29df <rdar://problem/9014045> more support for Apple internal build environments
llvm-svn: 130872
2011-05-04 21:50:46 +00:00
Howard Hinnant 3145a948d6 http://llvm.org/bugs/show_bug.cgi?id=9349 I introduced a bug with the last fix and Ryuta Suzuki has corrected it. And hopefully I committed Ryuta Suzuki's directions correctly this time.
llvm-svn: 126917
2011-03-03 01:59:23 +00:00
Howard Hinnant 01533ed9ad http://llvm.org/bugs/show_bug.cgi?id=9349 I have not personally tested this patch. Please let me know if it causes problems.
llvm-svn: 126846
2011-03-02 17:29:46 +00:00
Howard Hinnant 1a36219c86 Change install name to libc++.1.dylib
llvm-svn: 125626
2011-02-16 00:40:06 +00:00
Howard Hinnant 8d3b8265a6 updated buildit to work with recent clang updates
llvm-svn: 124432
2011-01-27 21:01:51 +00:00
Howard Hinnant c950e77d1d Effort to reduce the number of exported symbols
llvm-svn: 122057
2010-12-17 14:46:43 +00:00
Michael J. Spencer f5799be4a8 Add CMake build and fix major Linux blockers.
llvm-svn: 121510
2010-12-10 19:47:54 +00:00