Skip to content

Commit

Permalink
fix meson files.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmalmain committed Apr 6, 2024
1 parent 1c5cf55 commit f342794
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
23 changes: 13 additions & 10 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -1081,21 +1081,23 @@ if targetos == 'linux' and (have_system or have_tools)
required: get_option('libudev'))
endif

symcc_backend = get_option('symcc_backend')
symcc_rt_backend = get_option('symcc_rt_backend')

if not fs.is_file('subprojects/symcc-rt/RuntimeCommon.h')
error_msg='''The SymCC source path "@0@" is incorrect.
Did you initialize symcc-rt subrepository? (git submodule update --init --recursive subprojects/symcc-rt)'''.format('subprojects/symcc')
error(error_msg)
error('''Symcc Runtime does not seem to be present.
Did you initialize the symcc-rt submodule? (git submodule update --init --recursive subprojects/symcc-rt)''')
endif

symcc_rt = not_found

symcc_var = cmake.subproject_options()
symcc_var.add_cmake_defines({ 'SYMCC_RT_BACKEND': symcc_backend })
symcc_rt_vars = cmake.subproject_options()
symcc_rt_vars.add_cmake_defines({
'SYMCC_RT_BACKEND': symcc_rt_backend,
'Z3_TRUST_SYSTEM_VERSION': get_option('symcc_rt_trust_system_z3'),
})

symcc_rt_proj = cmake.subproject('symcc-rt', options: symcc_var)
if get_option('symcc_shared')
symcc_rt_proj = cmake.subproject('symcc-rt', options: symcc_rt_vars)
if get_option('symcc_rt_shared')
symcc_rt = symcc_rt_proj.dependency('SymccRtShared')
else
symcc_rt = symcc_rt_proj.dependency('SymccRtStatic')
Expand Down Expand Up @@ -4363,8 +4365,9 @@ summary(summary_info, bool_yn: true, section: 'Network backends')

# SymQEMU
summary_info = {}
summary_info += {'SymCC Backend': symcc_backend}
summary_info += {'SymCC Shared Library': get_option('symcc_shared')}
summary_info += {'SymCC Runtime Backend': symcc_rt_backend}
summary_info += {'SymCC Runtime trust system\'s Z3': get_option('symcc_rt_trust_system_z3')}
summary_info += {'SymCC Shared Library': get_option('symcc_rt_shared')}
summary(summary_info, bool_yn: true, section: 'SymQEMU')

# Libraries
Expand Down
8 changes: 5 additions & 3 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,9 @@ option('hexagon_idef_parser', type : 'boolean', value : true,
description: 'use idef-parser to automatically generate TCG code for the Hexagon frontend')

# SymQEMU related options
option('symcc_backend', type: 'string', value: 'qsym',
description: 'SymCC backend to use. Please check SymCC Runtime for a list of available backends.')
option('symcc_shared', type: 'boolean', value: false,
option('symcc_rt_backend', type: 'string', value: 'qsym',
description: 'SymCC Runtime backend to use. Please check SymCC Runtime for a list of available backends.')
option('symcc_rt_trust_system_z3', type: 'boolean', value: true,
description: 'Trust the system version of Z3 to build SymCC Runtime')
option('symcc_rt_shared', type: 'boolean', value: true,
description: 'Compile SymCC Runtime dynamically instead of statically.')
1 change: 0 additions & 1 deletion tests/unit/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ foreach test_name, extra: tests

# SymQEMU unit tests executable construction
if test_name == 'check-sym-runtime'

deps += [symcc_rt]

# embeds most of qemu objects, including SymQEMU
Expand Down

0 comments on commit f342794

Please sign in to comment.