]> git.ipfire.org Git - thirdparty/ccache.git/log
thirdparty/ccache.git
4 years agoAdd ASSERT and DEBUG_ASSERT macros
Joel Rosdahl [Fri, 18 Sep 2020 06:36:08 +0000 (08:36 +0200)] 
Add ASSERT and DEBUG_ASSERT macros

CMake always defines NDEBUG in release builds, so assertions are only
enabled in debug builds. Assertions were however always enabled before
switching to CMake. I prefer keeping assertions enabled in release
builds as well unless they are part of a tight loop.

Fix this by introducing two custom assertion macors:

- ASSERT(condition): Like assert(condition) but always enabled.
- DEBUG_ASSERT(condition): Like assert(condition), i.e. only enabled in
  debug builds.

All usage of assert(condition) is converted to ASSERT(condition) since
none of the assertions are made in performance-critical code.

4 years agoHandle waitpid interruption and add missing string header (#669)
Gregor Jasny [Mon, 21 Sep 2020 18:41:30 +0000 (20:41 +0200)] 
Handle waitpid interruption and add missing string header (#669)

4 years agoAdd support for hip language (#666)
Paul Fultz II [Mon, 21 Sep 2020 18:38:55 +0000 (13:38 -0500)] 
Add support for hip language (#666)

4 years agoAvoid mentioning __TIME__ and friends literally in header file
Joel Rosdahl [Thu, 17 Sep 2020 13:43:37 +0000 (15:43 +0200)] 
Avoid mentioning __TIME__ and friends literally in header file

Having them in the header files disables direct mode when compiling
ccache itself.

4 years agoAdd Util::clamp function
Joel Rosdahl [Thu, 17 Sep 2020 11:23:01 +0000 (13:23 +0200)] 
Add Util::clamp function

4 years agotest: Retrieve test suite list from CMakeLists.txt
Joel Rosdahl [Thu, 17 Sep 2020 11:08:43 +0000 (13:08 +0200)] 
test: Retrieve test suite list from CMakeLists.txt

4 years agoMake “-fstack-usage” test work when $COMPILER is a masquerading ccache
Joel Rosdahl [Thu, 17 Sep 2020 10:35:11 +0000 (12:35 +0200)] 
Make “-fstack-usage” test work when $COMPILER is a masquerading ccache

4 years agoFix and simplify calculation of cache size change
Joel Rosdahl [Wed, 16 Sep 2020 14:44:45 +0000 (16:44 +0200)] 
Fix and simplify calculation of cache size change

4 years agoUse appropriate type for size delta
Joel Rosdahl [Wed, 16 Sep 2020 13:52:55 +0000 (15:52 +0200)] 
Use appropriate type for size delta

4 years agoInclude thread ID in addition to process ID in symlink content
Joel Rosdahl [Wed, 16 Sep 2020 13:46:50 +0000 (15:46 +0200)] 
Include thread ID in addition to process ID in symlink content

This fixes a race condition when doing recompression with multiple
threads.

4 years agorecompress: Don’t defer updating statistics counter
Joel Rosdahl [Wed, 16 Sep 2020 13:26:17 +0000 (15:26 +0200)] 
recompress: Don’t defer updating statistics counter

As of dd8f65aa558, the Context destructor no longer flushes statistics.

4 years agoRefactor create_cachedir_tag
Joel Rosdahl [Tue, 15 Sep 2020 19:47:10 +0000 (21:47 +0200)] 
Refactor create_cachedir_tag

4 years agoRemove unnecessary suffix parameter from Util::get_path_in_cache
Joel Rosdahl [Tue, 15 Sep 2020 18:09:17 +0000 (20:09 +0200)] 
Remove unnecessary suffix parameter from Util::get_path_in_cache

4 years agoRemove cache_dir_levels (CCACHE_NLEVELS) setting
Joel Rosdahl [Thu, 10 Sep 2020 08:48:49 +0000 (10:48 +0200)] 
Remove cache_dir_levels (CCACHE_NLEVELS) setting

This is in preparation for two things:

1. Storing cache statistics (except size/files bookkeeping) on level 2
   instead of level 1, thus making “cache_dir_levels = 1” invalid.
2. Implementing automatic choice of cache levels based on the number of
   files in the cache.

4 years agorefactor: Convert Util::strip_whitespace to use string_view (#661)
Alexander Lanin [Thu, 17 Sep 2020 19:59:15 +0000 (21:59 +0200)] 
refactor: Convert Util::strip_whitespace to use string_view (#661)

4 years agoRefactor remaining stats_* functions into Statistics
Joel Rosdahl [Sat, 12 Sep 2020 18:41:27 +0000 (20:41 +0200)] 
Refactor remaining stats_* functions into Statistics

4 years agoRemove knowledge about legacy top-level stats file
Joel Rosdahl [Sat, 12 Sep 2020 14:02:24 +0000 (16:02 +0200)] 
Remove knowledge about legacy top-level stats file

The top-level stats file was removed in ccache 3.1 ten years ago so it
seems reasonable to remove knowledge about it now.

4 years agoRefactor Statistics::{write,increment} into Statistics::update
Joel Rosdahl [Sat, 12 Sep 2020 12:09:44 +0000 (14:09 +0200)] 
Refactor Statistics::{write,increment} into Statistics::update

4 years agoRefactor away stats_{add_cleanup,set_sizes}
Joel Rosdahl [Sat, 12 Sep 2020 10:58:46 +0000 (12:58 +0200)] 
Refactor away stats_{add_cleanup,set_sizes}

4 years agoRemove upgrade code for populating config with legacy cache size values
Joel Rosdahl [Sat, 12 Sep 2020 09:15:27 +0000 (11:15 +0200)] 
Remove upgrade code for populating config with legacy cache size values

Version 3.2, which introduced the configuration file, was released over
six years ago so it seems reasonable to remove upgrade code for older
versions now.

4 years agoRefactor flushing of stats and logs at ccache exit
Joel Rosdahl [Fri, 11 Sep 2020 14:55:25 +0000 (16:55 +0200)] 
Refactor flushing of stats and logs at ccache exit

Perform flushing of statistics counters (potentially triggering cache
cleanup) and log files in a finalizer inside cache_compilation instead
of in Conxtext’s destructor. This moves somewhat complex logic from
Context into the main ccache code.

As a side effect of this, stats_flush and stats_flush_to_file are
superfluous.

4 years agoAdd and use Statistics::increment function
Joel Rosdahl [Fri, 11 Sep 2020 14:50:26 +0000 (16:50 +0200)] 
Add and use Statistics::increment function

4 years agoExtract stats_{read,write} and Statistic enum to Statistics namespace
Joel Rosdahl [Fri, 11 Sep 2020 11:09:36 +0000 (13:09 +0200)] 
Extract stats_{read,write} and Statistic enum to Statistics namespace

4 years agoAdd unit tests of Counters class
Joel Rosdahl [Fri, 11 Sep 2020 07:43:29 +0000 (09:43 +0200)] 
Add unit tests of Counters class

4 years agoAdd and use Counters::increment(const Counters&)
Joel Rosdahl [Fri, 11 Sep 2020 07:43:00 +0000 (09:43 +0200)] 
Add and use Counters::increment(const Counters&)

4 years agoIntroduce Counters::{get,set}_raw
Joel Rosdahl [Fri, 11 Sep 2020 07:41:11 +0000 (09:41 +0200)] 
Introduce Counters::{get,set}_raw

Casting an integer to an enum class value is undefined behavior so let’s
strive not to do that.

4 years agoIntroduce Counters::get/set/increment methods, replacing operator[]
Joel Rosdahl [Thu, 10 Sep 2020 17:17:13 +0000 (19:17 +0200)] 
Introduce Counters::get/set/increment methods, replacing operator[]

The primary motivation for this is that it’s now possible to detect and
block underflow when incrementing a value in the unlikely but possible
event that a, say, cache_size_kibibyte is decremented below zero.

4 years agoReplace stats_update_size with incrementing counters directly
Joel Rosdahl [Thu, 10 Sep 2020 12:33:45 +0000 (14:33 +0200)] 
Replace stats_update_size with incrementing counters directly

4 years agoReplace stats_update with incrementing counters directly
Joel Rosdahl [Thu, 10 Sep 2020 08:56:47 +0000 (10:56 +0200)] 
Replace stats_update with incrementing counters directly

4 years agoTweak AsciiDoc section divider format
Joel Rosdahl [Thu, 10 Sep 2020 19:57:18 +0000 (21:57 +0200)] 
Tweak AsciiDoc section divider format

4 years agotest: Introduce unit test for -Xclang handling (#659)
Alexander Lanin [Mon, 14 Sep 2020 17:34:08 +0000 (19:34 +0200)] 
test: Introduce unit test for -Xclang handling (#659)

4 years agorefactor: Compare Args::to_string in tests, not internal state (#658)
Alexander Lanin [Mon, 14 Sep 2020 17:32:32 +0000 (19:32 +0200)] 
refactor: Compare Args::to_string in tests, not internal state (#658)

4 years agoSwitch from XXH64 to XXH3 for checksums (#657)
Erik Johansson [Thu, 10 Sep 2020 19:53:36 +0000 (21:53 +0200)] 
Switch from XXH64 to XXH3 for checksums (#657)

The latter promises better performance and supports automatic use of vector
instructions where appropriate.

4 years agoDon’t create <objectfile>.ccache-log when there is no object file
Joel Rosdahl [Tue, 8 Sep 2020 18:39:35 +0000 (20:39 +0200)] 
Don’t create <objectfile>.ccache-log when there is no object file

Fixes #656.

4 years agoDon’t log stat error in Util::read_file
Joel Rosdahl [Tue, 8 Sep 2020 18:09:52 +0000 (20:09 +0200)] 
Don’t log stat error in Util::read_file

An error is signalled via an exception so let’s make it up to the caller
whether to log or not.

4 years agoSimplify TemporaryFile
Joel Rosdahl [Tue, 8 Sep 2020 18:05:58 +0000 (20:05 +0200)] 
Simplify TemporaryFile

4 years agoAdd Util::ensure_dir_exists
Joel Rosdahl [Tue, 8 Sep 2020 18:05:43 +0000 (20:05 +0200)] 
Add Util::ensure_dir_exists

4 years agoAdd noexcept to move constructors and assignment operators
Joel Rosdahl [Tue, 8 Sep 2020 17:56:54 +0000 (19:56 +0200)] 
Add noexcept to move constructors and assignment operators

4 years agoMove File method definitions outside the class for tidiness
Joel Rosdahl [Tue, 8 Sep 2020 17:55:14 +0000 (19:55 +0200)] 
Move File method definitions outside the class for tidiness

4 years agoMove manifest functions into a Manifest namespace
Joel Rosdahl [Mon, 7 Sep 2020 07:09:20 +0000 (09:09 +0200)] 
Move manifest functions into a Manifest namespace

4 years agoAdd missing newline in --hash-file output
Joel Rosdahl [Sun, 6 Sep 2020 09:42:53 +0000 (11:42 +0200)] 
Add missing newline in --hash-file output

4 years agodoc: Correct default compression level
Joel Rosdahl [Sat, 5 Sep 2020 18:51:26 +0000 (20:51 +0200)] 
doc: Correct default compression level

4 years agoUse “using nonstd::*” consistently
Joel Rosdahl [Sat, 5 Sep 2020 18:46:42 +0000 (20:46 +0200)] 
Use “using nonstd::*” consistently

4 years agoIntroduce Util::parse_{unsigned,signed} functions
Joel Rosdahl [Sat, 5 Sep 2020 18:31:36 +0000 (20:31 +0200)] 
Introduce Util::parse_{unsigned,signed} functions

parse_unsigned replaces parse_uint32 while parse_signed replaces
parse_int. For simplicity, both return 64-bit values; I see no need to
be able to return narrower types since they are used for parsing
configuration values where a valid range is more important. Therefore
the functions optionally verify minimum and maximum allowed values.

4 years agoTweak some integer types
Joel Rosdahl [Sat, 5 Sep 2020 14:58:42 +0000 (16:58 +0200)] 
Tweak some integer types

4 years agoAllow for 64-bit values in statistics counters
Joel Rosdahl [Sat, 5 Sep 2020 14:55:39 +0000 (16:55 +0200)] 
Allow for 64-bit values in statistics counters

This is primaily done to avoid overflowing timestamp values in 2038.

4 years agoImprove name of ArgumentProcessingState::input_charset
Joel Rosdahl [Fri, 4 Sep 2020 17:42:42 +0000 (19:42 +0200)] 
Improve name of ArgumentProcessingState::input_charset

It holds the full option argument, not the value.

4 years agoConvert fromcache_call_mode enum to enum class
Joel Rosdahl [Fri, 4 Sep 2020 17:41:15 +0000 (19:41 +0200)] 
Convert fromcache_call_mode enum to enum class

4 years agoClean up ProcessArgsResult
Joel Rosdahl [Fri, 4 Sep 2020 13:44:49 +0000 (15:44 +0200)] 
Clean up ProcessArgsResult

4 years agoRemove redundant static keyword for namespace-level constants
Joel Rosdahl [Fri, 4 Sep 2020 13:23:25 +0000 (15:23 +0200)] 
Remove redundant static keyword for namespace-level constants

Namespace-level constant objects have static storage duration by
default.

4 years agoClean up .gitignore
Joel Rosdahl [Fri, 4 Sep 2020 13:07:31 +0000 (15:07 +0200)] 
Clean up .gitignore

4 years agoSimplify definition of the stats_info array
Joel Rosdahl [Fri, 4 Sep 2020 10:38:41 +0000 (12:38 +0200)] 
Simplify definition of the stats_info array

4 years agoImprove variable names related to statistics counters
Joel Rosdahl [Fri, 4 Sep 2020 07:40:21 +0000 (09:40 +0200)] 
Improve variable names related to statistics counters

4 years agorefactoring: Use return syntax for process_args (#652)
Alexander Lanin [Fri, 4 Sep 2020 06:32:45 +0000 (08:32 +0200)] 
refactoring: Use return syntax for process_args (#652)

4 years agorefactoring: Convert stats to enum class (#651)
Alexander Lanin [Fri, 4 Sep 2020 05:45:21 +0000 (07:45 +0200)] 
refactoring: Convert stats to enum class (#651)

4 years agoClarify naming conventions for enum and enum class values
Joel Rosdahl [Thu, 3 Sep 2020 11:18:12 +0000 (13:18 +0200)] 
Clarify naming conventions for enum and enum class values

4 years agoFix test errors with GCC 4.4
Joel Rosdahl [Wed, 2 Sep 2020 08:53:45 +0000 (10:53 +0200)] 
Fix test errors with GCC 4.4

4 years agoAdd Visual Studio build directory to .gitignore (#650)
Alexander Lanin [Wed, 2 Sep 2020 08:42:52 +0000 (10:42 +0200)] 
Add Visual Studio build directory to .gitignore (#650)

4 years agoSet _FILE_OFFSET_BITS to 64
Joel Rosdahl [Wed, 2 Sep 2020 07:51:54 +0000 (09:51 +0200)] 
Set _FILE_OFFSET_BITS to 64

This allows for operating on large files when compiled in 32-bit mode.

Fixes #649.

4 years agoAdd clang-format off/on for SIZEOF_INT
Joel Rosdahl [Wed, 2 Sep 2020 07:43:48 +0000 (09:43 +0200)] 
Add clang-format off/on for SIZEOF_INT

4 years agoImprove test cases that use objdump
Joel Rosdahl [Tue, 1 Sep 2020 17:48:24 +0000 (19:48 +0200)] 
Improve test cases that use objdump

- Added expect_objdump_contains and expect_objdump_not_contains utility
  functions to the main test framework, making objdump_cmd and grep_cmd
  (renamed to objdump_grep_cmd) internal utility functions.
- Removed strange support for the $HOST_OS_WINDOWS || $HOST_OS_CYGWIN
  case in objdump_grep_cmd. Let’s re-add it later if and when it becomes
  a problem.
- objdump_grep_cmd now greps for literal strings, thus no longer
  interpreting $PWD as a regex.
- Made test cases use expect_objdump_(not_)contains instead of
  “objdump_grep_cmd | grep_cmd”.

4 years agoImprove error message from expect_(not_)contains
Joel Rosdahl [Tue, 1 Sep 2020 15:10:38 +0000 (17:10 +0200)] 
Improve error message from expect_(not_)contains

4 years agoFix debug_prefix_map failure with old objdump versions
Joel Rosdahl [Tue, 1 Sep 2020 14:51:32 +0000 (16:51 +0200)] 
Fix debug_prefix_map failure with old objdump versions

“objdump -g” does not list debug info like the “Multiple
-fdebug-prefix-map” test expects when using objdump 2.20, e.g. on CentOS
6. “objdump -W” does however work, and it seems to work for object files
with compressed .debug_str section as well.

Related to issue #639.

(cherry picked from commit 3a7257ee23ad7985d18e459b6dbb6990b038df17)

4 years agoClean up inode_cache suite probe code
Joel Rosdahl [Mon, 31 Aug 2020 20:06:19 +0000 (22:06 +0200)] 
Clean up inode_cache suite probe code

4 years agoSkip inode_cache tests if temporary_dir is on NFS (#648)
Deepak Yadav [Mon, 31 Aug 2020 20:04:04 +0000 (01:34 +0530)] 
Skip inode_cache tests if temporary_dir is on NFS (#648)

4 years agoMerge address and UB sanitizer (#647)
Alexander Lanin [Mon, 31 Aug 2020 20:01:22 +0000 (22:01 +0200)] 
Merge address and UB sanitizer (#647)

4 years agoImprove handling of ccache version in the source release archive
Joel Rosdahl [Mon, 31 Aug 2020 08:30:38 +0000 (10:30 +0200)] 
Improve handling of ccache version in the source release archive

The version.cpp file is currently generated in the source directory.
This is a bit unclean since generated files are supposed to be put in
the build directory.

Also, when building from a source release archive outside a Git
repository the CMake scripts still try to get the version from Git and
then emit an ugly warning message:

    fatal: not a git repository (or any of the parent directories): .git
    fatal: not a git repository (or any of the parent directories): .git
    CMake Warning at cmake/GenerateVersionFile.cmake:42 (message):
      Running git failed
    Call Stack (most recent call first):
      cmake/GenerateVersionFile.cmake:50 (get_version_from_git)
      CMakeLists.txt:32 (include)

Fix this by including a VERSION file in the source release archive. If
the VERSION file exists, GenerateVersionFile.cmake just uses the version
from the file and doesn’t try to get a version from Git. If the file
doesn’t exist, the version is looked up from Git like before, but it’s a
fatal error if the version cannot be determined.

4 years agoUse GCC for building packages
Joel Rosdahl [Mon, 31 Aug 2020 07:27:10 +0000 (09:27 +0200)] 
Use GCC for building packages

It’s the standard compiler and still generates the fastest code.

4 years agoUse Ninja when building source and binary packages
Joel Rosdahl [Sun, 30 Aug 2020 19:49:47 +0000 (21:49 +0200)] 
Use Ninja when building source and binary packages

Ninja builds with relative paths so that ccache can be used to cache the
build without resorting to setting base_dir.

4 years agoUse proper names for source and binary packages
Joel Rosdahl [Sun, 30 Aug 2020 18:51:26 +0000 (20:51 +0200)] 
Use proper names for source and binary packages

Source package: ccache-$VERSION.tar.xz (and .tar.gz)
Binary package: ccache-$VERSION-$OS-$PROCESSOR.tar.xz (or .zip)

4 years agoGenerate tar.xz binary packages for non-Windows
Joel Rosdahl [Sun, 30 Aug 2020 18:31:23 +0000 (20:31 +0200)] 
Generate tar.xz binary packages for non-Windows

4 years agoGenerate both tar.gz and tar.xz source packages
Joel Rosdahl [Sun, 30 Aug 2020 18:31:02 +0000 (20:31 +0200)] 
Generate both tar.gz and tar.xz source packages

4 years agoRemove superfluous setting of CPACK_CMAKE_GENERATOR
Joel Rosdahl [Sun, 30 Aug 2020 18:30:06 +0000 (20:30 +0200)] 
Remove superfluous setting of CPACK_CMAKE_GENERATOR

Set CMAKE_GENERATOR if a non-default generator is wanted.

4 years agoRemove superfluous setting of CMAKE_DEBUG_POSTFIX
Joel Rosdahl [Sun, 30 Aug 2020 18:28:11 +0000 (20:28 +0200)] 
Remove superfluous setting of CMAKE_DEBUG_POSTFIX

4 years agoReset environment variables before running test suite probe
Joel Rosdahl [Fri, 28 Aug 2020 15:02:25 +0000 (17:02 +0200)] 
Reset environment variables before running test suite probe

This makes it possible to use $CCACHE in a stable way in probe
functions.

4 years agoRefactor Config::default_temporary_dir
Joel Rosdahl [Fri, 28 Aug 2020 06:14:30 +0000 (08:14 +0200)] 
Refactor Config::default_temporary_dir

4 years agoComment out unused parameter name instead of using [[maybe_unused]]
Joel Rosdahl [Thu, 27 Aug 2020 19:38:38 +0000 (21:38 +0200)] 
Comment out unused parameter name instead of using [[maybe_unused]]

I think that it makes the code look cleaner if the parameter is
definitely unused.

4 years agoTreat Clang-Format discrepancies as errors
Joel Rosdahl [Fri, 28 Aug 2020 06:08:33 +0000 (08:08 +0200)] 
Treat Clang-Format discrepancies as errors

If it becomes too tedious for drive-by contributors we’ll disable it
again.

4 years agoFix code formatting
Joel Rosdahl [Fri, 28 Aug 2020 06:07:58 +0000 (08:07 +0200)] 
Fix code formatting

4 years agoSupport building on MSVC (#632)
Rafael Kitover [Thu, 27 Aug 2020 19:23:26 +0000 (19:23 +0000)] 
Support building on MSVC (#632)

With these changes, the project builds with Visual Studio 2019, unit
tests pass and it works correctly with mingw gcc.

NOTE: The very latest version of Visual Studio 2019 is required, because
there was just a necessary fix for template arguments.

Tested building and running unit tests on Windows+MSVC, Windows+MinGW,
Linux and macOS.

- Enable `ZSTD_FROM_INTERNET` by default for MSVC when not using vcpkg
  or conan.

- Add include tests for some standard UNIX headers not available on
  MSVC.

- Add necessary MSVC compiler flags.

- In `Args::from_gcc_atfile()` iterate over the string via `c_str()`
  instead of `cbegin()`, the MSVC string character iterator does not
  include the ending null byte.

- Misc. minor cmake fix-ups.

- Add some headers that are not implicitly included from other headers
  like `<algorithm>`, `<ios>`, `<cstdint>` and `<cstdarg>` in some
  places, gcc does this but MSVC does not.

- Add `std::filesystem` version of `Util::traverse()` when dirent.h is
  not available, which is preferred for performance reasons.

- Add implementations of the following functions that are not available
  in MSVC in Win32Util.cpp: `gettimeofday()`, `localtime_r()`,
  `asprintf()`.

- Add Windows implementation of `getopt_long()` from
  https://www.codeproject.com/Articles/157001/Full-getopt-Port-for-Unicode-and-Multibyte-Microso
  to third_party/win32.

- Add some compatibility typedefs, constants and macros to the `_WIN32`
  section of system.hpp, as well as the prototypes for the functions
  added to Win32Util.cpp.

- Fix up unit tests expecting '/' separated paths to expect paths
  delimited by `DIR_DELIM_CH`.

- Invoke test/run with bash from cmake, necessary on msys2+mingw64, many
  fail, there is more work to do here.

- Set the warning level to `/W4` and silence all the uninteresting
  warning types. Compiles with no warnings now.

- Switch to using standard C++ attributes `[[nodiscard]]` and
  `[[maybe_unused]]` and define macros for gcc for their equivalents.

- `#define DOCTEST_CONFIG_USE_STD_HEADERS` for MSVC only, because it
  requires explicitly including `<ostream>`.

- Add vim files to .gitignore.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
4 years agoSupport passing level 0 to “ccache -X” to use default level
Joel Rosdahl [Thu, 27 Aug 2020 08:35:59 +0000 (10:35 +0200)] 
Support passing level 0 to “ccache -X” to use default level

4 years agoLet “ccache -X” print before/after statistics
Joel Rosdahl [Thu, 27 Aug 2020 07:30:56 +0000 (09:30 +0200)] 
Let “ccache -X” print before/after statistics

4 years agoImprove layout of “ccache -x” statistics
Joel Rosdahl [Thu, 27 Aug 2020 07:29:43 +0000 (09:29 +0200)] 
Improve layout of “ccache -x” statistics

4 years agoMake Util::format_human_readable_size format kB
Joel Rosdahl [Thu, 27 Aug 2020 07:22:50 +0000 (09:22 +0200)] 
Make Util::format_human_readable_size format kB

4 years agoFix asm compiler detection (#644)
Alexander Lanin [Thu, 27 Aug 2020 19:18:56 +0000 (21:18 +0200)] 
Fix asm compiler detection (#644)

CMake requires ASM to be the last parameter so it can try whether the C compiler can compile asm.
See https://gitlab.kitware.com/cmake/cmake/-/merge_requests/1560/diffs

4 years agoFix override usage (#640)
Alexander Lanin [Thu, 27 Aug 2020 05:11:56 +0000 (07:11 +0200)] 
Fix override usage (#640)

4 years agoUpdate comments, remove references to old global variables (#637)
Thomas Otto [Tue, 25 Aug 2020 20:20:04 +0000 (22:20 +0200)] 
Update comments, remove references to old global variables (#637)

4 years agoUtil::unlink_tmp: Log with correct errno (#636)
Thomas Otto [Tue, 25 Aug 2020 20:19:12 +0000 (22:19 +0200)] 
Util::unlink_tmp: Log with correct errno (#636)

4 years agobuild.yaml: Improve naming of build jobs
Joel Rosdahl [Tue, 25 Aug 2020 17:05:42 +0000 (19:05 +0200)] 
build.yaml: Improve naming of build jobs

4 years agobuild.yaml: Collect testdir from either build or .
Joel Rosdahl [Sun, 23 Aug 2020 18:31:40 +0000 (20:31 +0200)] 
build.yaml: Collect testdir from either build or .

Also fix the name attribute sent to actions/upload-artifact.

4 years agobuild.yaml: Use build type CI by default
Joel Rosdahl [Sun, 23 Aug 2020 18:11:30 +0000 (20:11 +0200)] 
build.yaml: Use build type CI by default

I think that it makes sense to use a ccache binary built in release mode
in CI tests by default since that is what the end user will actually
run. At the same time we want to test assertions in CI, so use the CI
build type which is RelWithDebInfo but without -DNDEBUG. I here assume
that the difference between -O3 (from build type Release) and -O2 (from
build type RelWithDebInfo) is small.

Changed OS to Ubuntu 20.04 for “Linux MinGW 64-bit” since the cross
compiler in Ubuntu 18.04 is buggy.

4 years agoAdd CMake build type “CI” like “RelWithDebInfo” but without -DNDEBUG
Joel Rosdahl [Sun, 23 Aug 2020 18:10:36 +0000 (20:10 +0200)] 
Add CMake build type “CI” like “RelWithDebInfo” but without -DNDEBUG

4 years agoRemove Travis build and related scripts
Joel Rosdahl [Sun, 23 Aug 2020 17:32:37 +0000 (19:32 +0200)] 
Remove Travis build and related scripts

4 years agobuild.yaml: Consistently use extra indentation level for lists
Joel Rosdahl [Sun, 23 Aug 2020 14:24:15 +0000 (16:24 +0200)] 
build.yaml: Consistently use extra indentation level for lists

4 years agobuild.yaml: Add Clang-Format step
Joel Rosdahl [Sun, 23 Aug 2020 14:12:48 +0000 (16:12 +0200)] 
build.yaml: Add Clang-Format step

4 years agobuild.yaml: Pass EXTRA_CMAKE_BUILD_FLAGS to “Build and test” step
Joel Rosdahl [Sat, 22 Aug 2020 18:51:28 +0000 (20:51 +0200)] 
build.yaml: Pass EXTRA_CMAKE_BUILD_FLAGS to “Build and test” step

This will make the “Build documentation” and “Build manpage” step do
what’s intended.

4 years agoRename BUILDEXTRAFLAGS to EXTRA_CMAKE_BUILD_FLAGS
Joel Rosdahl [Sat, 22 Aug 2020 18:50:55 +0000 (20:50 +0200)] 
Rename BUILDEXTRAFLAGS to EXTRA_CMAKE_BUILD_FLAGS

4 years agobuild.yaml: Sort environment variable lists
Joel Rosdahl [Sat, 22 Aug 2020 18:48:29 +0000 (20:48 +0200)] 
build.yaml: Sort environment variable lists

4 years agotest: Apply missing renaming of expect_* functions
Joel Rosdahl [Sat, 22 Aug 2020 18:44:19 +0000 (20:44 +0200)] 
test: Apply missing renaming of expect_* functions

These were missed in 733f98804a4e but the error messages were hidden
then run via CTest.

4 years agobuild.yaml: Don’t use flow style YAML
Joel Rosdahl [Sat, 22 Aug 2020 18:27:26 +0000 (20:27 +0200)] 
build.yaml: Don’t use flow style YAML