Apply suggestions from code review

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
John Ericson 2024-07-04 17:48:27 -04:00 committed by GitHub
parent b0bc2a97bf
commit e4056b9afd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 6 additions and 10 deletions

View file

@ -20,7 +20,7 @@ deps_private = [ ]
# C library, whose public interface --- including public but not private # C library, whose public interface --- including public but not private
# dependencies --- will also likewise soon be stable. # dependencies --- will also likewise soon be stable.
# #
# N.B. For distributions that care about "ABI" stablity and not just # N.B. For distributions that care about "ABI" stability and not just
# "API" stability, the private dependencies also matter as they can # "API" stability, the private dependencies also matter as they can
# potentially affect the public ABI. # potentially affect the public ABI.
deps_public = [ ] deps_public = [ ]

View file

@ -9,8 +9,5 @@ add_project_arguments(
# Enable assertions in libstdc++ by default. Harmless on libc++. Benchmarked # Enable assertions in libstdc++ by default. Harmless on libc++. Benchmarked
# at ~1% overhead in `nix search`. # at ~1% overhead in `nix search`.
# #
# FIXME: remove when we get meson 1.4.0 which will default this to on for us:
# https://mesonbuild.com/Release-notes-for-1-4-0.html#ndebug-setting-now-controls-c-stdlib-assertions
'-D_GLIBCXX_ASSERTIONS=1',
language : 'cpp', language : 'cpp',
) )

View file

@ -69,7 +69,7 @@ headers = [config_h] + files(
'nix_api_value.h', 'nix_api_value.h',
) )
# TODO don't install this once tests don't use it. # TODO move this header to libexpr, maybe don't use it in tests?
headers += files('nix_api_expr_internal.h') headers += files('nix_api_expr_internal.h')
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')

View file

@ -1,7 +1,6 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonDerivation
, releaseTools
, meson , meson
, ninja , ninja

View file

@ -61,7 +61,7 @@ headers = [config_h] + files(
'nix_api_store.h', 'nix_api_store.h',
) )
# TODO don't install this once tests don't use it. # TODO don't install this once tests don't use it and/or move the header into `libstore`, non-`c`
headers += files('nix_api_store_internal.h') headers += files('nix_api_store_internal.h')
subdir('build-utils-meson/export-all-symbols') subdir('build-utils-meson/export-all-symbols')

View file

@ -118,7 +118,8 @@ busybox = find_program(get_option('sandbox-shell'), required : false)
if get_option('embedded-sandbox-shell') if get_option('embedded-sandbox-shell')
# This one goes in config.h # This one goes in config.h
# The path to busybox is passed as a -D flag when compiling this_library. # The path to busybox is passed as a -D flag when compiling this_library.
# Idk why, ask the old buildsystem. # This solution is inherited from the old make buildsystem
# TODO: do this differently?
configdata.set('HAVE_EMBEDDED_SANDBOX_SHELL', 1) configdata.set('HAVE_EMBEDDED_SANDBOX_SHELL', 1)
hexdump = find_program('hexdump', native : true) hexdump = find_program('hexdump', native : true)
embedded_sandbox_shell_gen = custom_target( embedded_sandbox_shell_gen = custom_target(

View file

@ -30,7 +30,7 @@ subdir('build-utils-meson/export-all-symbols')
rapidcheck = dependency('rapidcheck') rapidcheck = dependency('rapidcheck')
deps_private += rapidcheck deps_private += rapidcheck
gtest = dependency('gtest', main : true) gtest = dependency('gtest')
deps_private += gtest deps_private += gtest
gtest = dependency('gmock') gtest = dependency('gmock')
@ -77,7 +77,6 @@ this_exe = executable(
include_directories : include_dirs, include_directories : include_dirs,
# TODO: -lrapidcheck, see ../libutil-support/build.meson # TODO: -lrapidcheck, see ../libutil-support/build.meson
link_args: linker_export_flags + ['-lrapidcheck'], link_args: linker_export_flags + ['-lrapidcheck'],
# get main from gtest
install : true, install : true,
) )