diff --git a/CMakeLists.txt b/CMakeLists.txt index d4c649675b..cd7315060d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,4 +138,5 @@ target_include_directories(scylla PUBLIC ${SEASTAR_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} xxhash + libdeflate build/release/gen) diff --git a/configure.py b/configure.py index 028048a7fb..5dcff9a628 100755 --- a/configure.py +++ b/configure.py @@ -1008,6 +1008,8 @@ seastar_ldflags = args.user_ldflags seastar_flags += ['--compiler', args.cxx, '--c-compiler', args.cc, '--cflags=%s' % (seastar_cflags), '--ldflags=%s' % (seastar_ldflags), '--c++-dialect=gnu++1z', '--optflags=%s' % (modes['release']['opt']), ] +libdeflate_cflags = seastar_cflags + status = subprocess.call([args.python, './configure.py'] + seastar_flags, cwd='seastar') if status != 0: @@ -1179,6 +1181,9 @@ with open(buildfile, 'w') as f: if binary.endswith('.a'): f.write('build $builddir/{}/{}: ar.{} {}\n'.format(mode, binary, mode, str.join(' ', objs))) else: + objs.extend(['$builddir/' + mode + '/' + artifact for artifact in [ + 'libdeflate/libdeflate.a' + ]]) if binary.startswith('tests/'): local_libs = '$libs' if binary not in tests_not_using_seastar_test_framework or binary in pure_boost_tests: @@ -1269,6 +1274,10 @@ with open(buildfile, 'w') as f: ''').format(**locals())) f.write('build build/{mode}/scylla-package.tar.gz: package build/{mode}/scylla build/{mode}/iotune build/SCYLLA-RELEASE-FILE build/SCYLLA-VERSION-FILE | always\n'.format(**locals())) f.write(' mode = {mode}\n'.format(**locals())) + f.write('rule libdeflate.{mode}\n'.format(**locals())) + f.write(' command = make -C libdeflate BUILD_DIR=../build/{mode}/libdeflate/ CFLAGS="{libdeflate_cflags}"\n'.format(**locals())) + f.write('build build/{mode}/libdeflate/libdeflate.a: libdeflate.{mode}\n'.format(**locals())) + f.write('build {}: phony\n'.format(seastar_deps)) f.write(textwrap.dedent('''\ rule configure