Commit Graph

188 Commits

Author SHA1 Message Date
Evan Tschannen 6156042f67
Merge pull request #3017 from tclinken/enable-wclass-memaccess
Enable -Wclass-memaccess and fix warnings
2020-04-29 10:38:59 -07:00
Andrew Noyes 50592d58fd Fix botched merge 2020-04-25 03:33:23 +00:00
Andrew Noyes 1a71062ea9 Support compiling/running with thread sanitizer 2020-04-25 00:26:50 +00:00
Markus Pilman e870925b80 fixed documentation for USE_LD 2020-04-23 14:37:20 -07:00
tclinken 2049b3802a Only use -Wclass-memaccess when compiling C++ files 2020-04-23 12:42:26 -07:00
Markus Pilman 159b97517b Chose sensible compiler defaults 2020-04-23 12:24:12 -07:00
tclinken b1f525583a Added -Wclass-memaccess compiler option and fixed warnings 2020-04-22 21:53:42 -07:00
Markus Pilman a3b5efe6eb suppress weird ccache warning with clang 2020-04-10 10:08:24 -07:00
Markus Pilman ceab4374cf statically link libc++ 2020-04-09 14:16:14 -07:00
Markus Pilman 8b5780c36c don't include source and binary dir
This forces users to use include paths from the sources root.

So `#include "Arena.h"` won't work anymore, only
`#include "flow/Arena.h"` will.
2020-04-06 10:13:49 -07:00
Markus Pilman 95fc5ae4ec Introduce `set_env` function
This makes it easier to handle environment variables in cmake.
It also reduces the code needed to check whether variables are correct
2020-03-27 15:44:55 -07:00
Andrew Noyes 0539ca55d8 Update cmake VALGRIND defs to match Makefile 2020-03-03 13:41:37 -08:00
Alex Miller 188b564dfb
Merge pull request #2147 from atn34/werror
Don't use -Werror by default
2020-02-13 18:35:57 -08:00
mpilman 5a9d420cb7 Merge remote-tracking branch 'upstream/release-6.2' into release-merges/20200210 2020-02-10 10:02:05 -08:00
mpilman 5c294e2646 Several build improvements - enables parallel builds on Windows (again) 2020-02-09 08:34:14 -08:00
mpilman d09e07f1f5 Merge remote-tracking branch 'upstream/master' into features/icc 2020-02-04 10:26:18 -08:00
Andrew Noyes a6b3a3ee47 Set USE_WERROR on build/docker-compose.yaml 2020-02-03 09:09:43 -08:00
Andrew Noyes 33132fe0ca Set USE_WERROR to ON for gcc 8.3.1 2020-02-03 09:06:29 -08:00
Andrew Noyes ffe617376c Don't use -Werror by default
We'll still enforce that PR's are warning-free before they're merged.
2020-02-03 09:06:29 -08:00
Daniel Smith 9f1fda554c
Formatting 2020-01-28 21:32:56 -05:00
Daniel Smith 4ecf58adff
Apply suggestions from code review
Co-Authored-By: Markus Pilman <markus@pilman.ch>
2020-01-28 21:32:13 -05:00
Daniel Smith b9de844ee7 Add link option specific to Clang 2020-01-28 12:51:05 -05:00
Alvin Moore 21390c493a Merge branch 'release-6.2' of github.com:apple/foundationdb into release_6.2_merge
Resolved merge by keeping new test file from master branch: SampleNoSimAttrition.txt adding new constraint from Release branch about existing test file: SimpleExternalTest.txt

# Conflicts:
#	tests/CMakeLists.txt
2019-12-18 09:05:08 -08:00
Alvin Moore 28d626800d Allow Valgrind to be enabled via environmental variable 2019-12-17 07:12:26 -08:00
Alvin Moore 3da9d182b1 Switched to using environmental variable for enablement since TOUPPER did not produce expected results sometimes 2019-12-16 14:37:51 -08:00
Alvin Moore 413cafe368 Modified compilation and package names to conform to existing compilation options and packaging names
Modifications to existing standards (even when wrong should be made outside of port to cmake)
2019-12-15 07:13:46 -08:00
Andrew Noyes 6a5f2a7eec Disable alignment-requiring instructions until #1434 is resolved 2019-12-11 11:05:02 -08:00
Andrew Noyes 991733a7fb Disable alignment-requiring instructions until #1434 is resolved 2019-12-05 15:11:10 -08:00
Andrew Noyes 1721658210 Ignore -fsanitize=alignment for UBSAN
Until we fix all occurrences
2019-12-02 16:20:06 -08:00
Andrew Noyes 4022ca1381 Add USE_UBSAN cmake option 2019-12-02 16:20:06 -08:00
Andrew Noyes 30908b0bb1 Ignore -fsanitize=alignment for UBSAN
Until we fix all occurrences
2019-11-26 19:34:44 -08:00
Andrew Noyes b893374c68 Add -Wno-attributes for gcc 2019-10-25 10:42:22 -07:00
Evan Tschannen 3325980c03 Merge branch 'release-6.2'
# Conflicts:
#	CMakeLists.txt
#	documentation/sphinx/source/release-notes.rst
#	fdbserver/DataDistribution.actor.cpp
#	fdbserver/OldTLogServer_6_0.actor.cpp
#	fdbserver/TLogServer.actor.cpp
#	fdbserver/WorkerInterface.actor.h
#	fdbserver/worker.actor.cpp
#	versions.target
2019-10-24 17:38:15 -07:00
mpilman a79757a788 Fix compiler errors on Catalina
Fixes #2263
2019-10-21 11:15:37 -07:00
Meng Xu d0147e5e5d Merge branch 'release-6.2' into mengxu/merge-release620-to-master-v3
Resolved Conflicts:
	documentation/sphinx/source/release-notes.rst
	fdbserver/DataDistribution.actor.cpp
	versions.target
2019-10-02 13:22:56 -07:00
Andrew Noyes c967fa55cc Add USE_UBSAN cmake option 2019-09-26 13:44:28 -07:00
Alvin Moore f13039e6d4 Switched to using CMAKE_CXX_STANDARD for setting c++17 2019-09-24 11:22:24 -07:00
Alvin Moore 9ae1125a85 Only enable `no-register ` option if ccache is enabled because of ccache problem 2019-09-24 11:22:24 -07:00
Alvin Moore c447d5999d Added support to allow USE_LIBCXX to be enabled via environmental variable
Changed use of '-std=c++17)' to setting the CXX standard via CMAKE_CXX_STANDARD keyword
Added c++ library for linking
Added compilation options to ignore certain command parameters when using CCACHE due to ccache bug
2019-09-24 11:22:24 -07:00
Alvin Moore e59fb55342 Fixed space vs tab 2019-09-12 11:56:03 -07:00
Alvin Moore b765e73202 Ensured that using DEFAULT for USE_LD does not result in error 2019-09-12 11:56:03 -07:00
Alvin Moore e741ad299b Added support for using different linkers within make projects
Better cmake support for linkers
2019-09-12 11:56:03 -07:00
Alvin Moore 443d5ffa41 Added support for specifying the build linker by environmental variable
Added support for specifying the BFD linker
2019-09-12 11:56:03 -07:00
Alvin Moore bb40023a4e
Merge pull request #1903 from AlvinMooreSr/cmake-lld
Allow Linker Specification Via Environmental Variable
2019-08-21 10:23:17 -07:00
Alvin Moore 1aa69b0baf Fixed space vs tab 2019-08-20 16:35:41 -07:00
Alvin Moore 7a88a850c5 Ensured that using DEFAULT for USE_LD does not result in error 2019-08-20 16:10:18 -07:00
Andrew Noyes 34dee5f9e3 Pass -Wno-unknown-attributes only for IDE 2019-08-16 09:24:57 -07:00
Andrew Noyes e4de4783bf Add [[flow_allow_discard]] 2019-08-16 09:24:57 -07:00
Andrew Noyes b17ad0ad64 Enable -Wunused-value 2019-08-16 09:24:57 -07:00
negoyal fe53b5e7a7 Add a parameter to enable/disable valgrind for ctest. 2019-08-15 11:56:34 -07:00
mpilman 7d247af500 Two minor bug fixes from recent optimizations 2019-07-31 19:14:11 -07:00
mpilman b6440c7781 added flamegraph util 2019-07-30 18:36:10 -07:00
mpilman b81a4ef6a2 clang+libc++ support on linux + dtrace probes 2019-07-30 18:36:10 -07:00
Alvin Moore 397ad77532 Added support for using different linkers within make projects
Better cmake support for linkers
2019-07-29 16:41:42 -07:00
Alvin Moore e52d34e93a Added support for specifying the build linker by environmental variable
Added support for specifying the BFD linker
2019-07-26 08:49:56 -07:00
mpilman b18666d942 statically link libstdc++ on Linux and remove std::variant
this will hopefully fix #1610
2019-07-16 14:53:16 -07:00
Markus Pilman 520f552082
Update cmake/ConfigureCompiler.cmake
Co-Authored-By: A.J. Beamon <ajbeamon@users.noreply.github.com>
2019-07-15 15:16:43 -07:00
mpilman 23963328cc Compile relative paths into the debug info
This is a suggestion to resolve #1780

This change introduces a new cmake flag `RELATIVE_DEBUG_PATHS`.
If this flag is set or FDB is compiled with `-DFDB_RELEASE=ON`,
the resulting binary will have debug information using relative
file paths to source files. This simulates the behavior of the
old build system but might break local debugging (making the
debugger aware of build and source directory will be required).
2019-07-09 12:11:51 -07:00
Andrew Noyes 3a246c1d25 Remove -fdiagnostics-color=always
This way you can run with -DCMAKE_COLOR_MAKEFILE=0 in CI and not get
garbled escape characters in your log
2019-06-28 17:46:47 -07:00
mpilman ab019fbe41 More minor fixes, removed snapshots 2019-06-20 14:28:31 -07:00
mpilman 844dd60202 FDB compiling with intel compiler 2019-06-20 09:29:01 -07:00
mpilman 6f52059750 Fix backtraces
pass -fno-omit-frame-pointer as we otherwise see broken back traces.
This should fix #1631 as well.
2019-06-18 15:33:12 -07:00
mpilman 8590cd4286 Add libc++ support for non-MacOS 2019-06-10 17:34:03 -07:00
Alvin Moore 4e99bebb18 Added support for enabling ccache by environmental variable 2019-06-06 08:54:31 -07:00
Alex Miller 77697666e6 Make USE_CCACHE=ON print an error if ccache is not found 2019-06-05 11:46:41 -07:00
Alex Miller 78137c9ae8 Add a cmake flag to enable ccache use by default. 2019-06-05 11:46:41 -07:00
sramamoorthy 8370871e4c stale RESTORE option related code removed 2019-05-28 22:07:46 -07:00
sramamoorthy 69edefe68b Snapshot based backup and resotre implementation 2019-05-28 22:07:46 -07:00
Austin Seipp ee1e3f620a cmake: add support for choosing 'ld' via -DUSE_LD
This introduces a new USE_LD cached variable which can be set to one of
three values: LD, GOLD, or LLD. In the latter two cases, we propagate
the -fuse-ld={gold,lld} option to the compiler. The default case
defaults to whatever the ordinary system linker is, i.e. it does
nothing.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-05-15 08:33:36 -10:00
mpilman 69fa3d3903 fixed compilation issues after rebase 2019-05-13 14:15:23 -07:00
mpilman 8bbd28315e Added Object serializer (does not yet compile) 2019-05-13 14:15:22 -07:00
mpilman 33b6e4ec3e Add /MP option to compiler to allow for more parallelism 2019-04-17 16:13:34 -07:00
Andrew Noyes 6207d724f8 Fix all -Wunused-variable warnings 2019-04-15 18:13:00 -07:00
Jingyu Zhou bb775eaf45 Only add compiler flags of gperftools for gcc 2019-04-02 19:58:21 -07:00
Jingyu Zhou 56a1128a9b Enhance cmake's gperftools support
Add compiler flags and link flags for gperftools.
2019-04-02 17:34:29 -07:00
Markus Pilman 913588d6f1 Update cmake/ConfigureCompiler.cmake
Co-Authored-By: satherton <stevea@apple.com>
2019-03-15 21:03:03 -07:00
Stephen Atherton 7f8475cf27 Removed flow/boost.cpp and the copied boost files it was using, added boost macros to makefile and cmake stuff to hopefully enable building without them. 2019-03-15 21:03:03 -07:00
mpilman bc4820865e Fix some Windows issues
1. We need to set a Windows target to get rid of warnings when compiling
   files that include windows.h
2. By default Boost will try to automatically link against boost_system.
   In order to prevent this, we define BOOST_ALL_NO_LIB
3. Somehow, I had to include winioctl.h in Platform.cpp. According to
   the documentation from MS, this shouldn't be necessary as windows.h
   includes this as well. However, for me it didn't compile otherwise.
2019-03-11 20:42:35 -07:00
Markus Pilman 590863479b Update cmake/ConfigureCompiler.cmake
Co-Authored-By: jzhou77 <jingyuzhou@gmail.com>
2019-03-05 14:58:44 -08:00
Jingyu Zhou bdf0fc4ffb Enable .pdb file generation on Windows
Add compiler flag for generating program database file (PDB) for Visual Studio.
2019-03-05 14:58:44 -08:00
mpilman f6ab577002 Fix Windows issue with libressl 2019-02-15 00:01:42 -08:00
mpilman 0d7d1a2b63 added IDE support for cmake 2019-02-15 00:01:42 -08:00
mpilman 6da5971e79 Guard all versions.h to not break old WIN32 build 2019-02-08 16:06:00 -08:00
mpilman 7e26b4ef0d Address comments from PR 2019-02-07 15:37:04 -08:00
mpilman f03cd6aee1 make c bindings work on Windows 2019-02-07 15:37:04 -08:00
mpilman 8a94d80deb fdbservice and fdbrpc now compiling 2019-02-07 15:37:04 -08:00
mpilman 7a858b902d Most of FDB compiling on Windows with cmake 2019-02-07 15:37:04 -08:00
mpilman a31df1b0a6 Addressed comments from pull requests
- Moved some larger sections in CMakeLists.txt into separate files
- Fixed an include issue on OS X
- Fixed boost version
- Use PROJECT_VERSION by default instead of using versions.target
2019-01-02 13:32:26 -08:00