[build] Add support for ASM files in Make + CMake

* Extract out common portion of `lib/Makefile` into `lib/libzstd.mk`.
  Most relevantly, the way we find library files.
* Use `lib/libzstd.mk` in the other Makefiles instead of repeating the
  same code.
* Add a test `tests/test-variants.sh` that checks that the builds of
  `make -C programs allVariants` are correct, and run it in Actions.
* Adds support for ASM files in the CMake build.

The Meson build is not updated because it lists every file in zstd,
and supports ASM off the bat, so the Huffman ASM commit will just add
the ASM file to the list.

The Visual Studios build is not updated because I'm not adding ASM
support to Visual Studios yet.
This commit is contained in:
Nick Terrell
2021-09-17 14:13:53 -07:00
parent 9d2a45a705
commit 8bf699aa59
16 changed files with 455 additions and 336 deletions
+7 -6
View File
@@ -7,6 +7,8 @@ jobs:
# preinstalled to reduce installation time.
docker:
- image: fbopensource/zstd-circleci-primary:0.0.1
# TODO: Re-enable aarch64 build:
# make aarch64build && make clean
steps:
- checkout
- run:
@@ -14,12 +16,11 @@ jobs:
command: |
./tests/test-license.py
cc -v; CFLAGS="-O0 -Werror -pedantic" make all && make clean
make c99build ; make clean
make c11build ; make clean
make aarch64build ; make clean
make -j regressiontest; make clean
make shortest ; make clean
make cxxtest ; make clean
make c99build && make clean
make c11build && make clean
make -j regressiontest&& make clean
make shortest && make clean
make cxxtest && make clean
# the second half of the jobs are in this test
short-tests-1:
docker: