Skip to content

Instantly share code, notes, and snippets.

@menangen
Created August 20, 2019 09:07
Show Gist options
  • Save menangen/17e716fb680ab166206981d7e236844c to your computer and use it in GitHub Desktop.
Save menangen/17e716fb680ab166206981d7e236844c to your computer and use it in GitHub Desktop.
QuickJS Meson build
project('quickjs', 'c', version : '2019-08-10')
add_project_arguments('-DCONFIG_VERSION="2019-08-10"', language : 'c')
lib = static_library('quickjs', 'quickjs.c', 'cutils.c', 'quickjs-libc.c', 'libregexp.c', 'libunicode.c')
compiler = executable('qjsc', 'qjsc.c', link_with : lib) #, link_args : '-Wl,-S'
repl_c = custom_target(
'repl.c',
input : 'repl.js',
output : 'repl.c',
command : [compiler, '-c', '-o', '@OUTPUT@', '-m', '@INPUT@'])
executable('qjs', ['qjs.c', repl_c], link_with : lib)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment