X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=meson.build;h=d35dcb5661a7c0b3a66d880a87003f79de3d131c;hb=ec67a4b205b93f3d260470485949b29abac6ad21;hp=3f4935b24afc540937963b1cce76caf28773a3fb;hpb=bf1305bfc28da216b2a54995bda2041262f92759;p=nageru diff --git a/meson.build b/meson.build index 3f4935b..d35dcb5 100644 --- a/meson.build +++ b/meson.build @@ -3,6 +3,15 @@ qt5 = import('qt5') protoc = find_program('protoc') cxx = meson.get_compiler('cpp') +# Use lld if we can; it links a lot faster than ld.bfd or gold. +nageru_link_args = [] +code = '''#include +int main() { printf("Hello, world!\n"); return 0; } +''' +if cxx.links(code, args: '-fuse-ld=lld', name: 'check for LLD') + nageru_link_args += '-fuse-ld=lld' +endif + embedded_bmusb = get_option('embedded_bmusb') alsadep = dependency('alsa') @@ -36,7 +45,6 @@ nageru_deps = [qt5deps, libjpegdep, movitdep, libmicrohttpddep, protobufdep, qcustomplotdep, threaddep] nageru_include_dirs = [] nageru_link_with = [] -nageru_link_args = [] nageru_build_rpath = '' nageru_install_rpath = '' @@ -182,7 +190,7 @@ nageru_link_with += audio # Mixer objects. srcs += ['chroma_subsampler.cpp', 'v210_converter.cpp', 'mixer.cpp', 'pbo_frame_allocator.cpp', 'context.cpp', 'theme.cpp', 'image_input.cpp', 'alsa_output.cpp', - 'disk_space_estimator.cpp', 'timecode_renderer.cpp', 'tweaked_inputs.cpp'] + 'disk_space_estimator.cpp', 'timecode_renderer.cpp', 'tweaked_inputs.cpp', 'mjpeg_encoder.cpp'] # Streaming and encoding objects (largely the set that is shared between Nageru and Kaeru). stream_srcs = ['quicksync_encoder.cpp', 'x264_encoder.cpp', 'x264_dynamic.cpp', 'x264_speed_control.cpp', 'video_encoder.cpp', @@ -230,10 +238,11 @@ executable('kaeru', 'kaeru.cpp', dependencies: [nageru_deps, kaeru_extra_deps], include_directories: nageru_include_dirs, link_with: [stream, aux, kaeru_link_with], + link_args: nageru_link_args, install: true) # Audio mixer microbenchmark. -executable('benchmark_audio_mixer', 'benchmark_audio_mixer.cpp', dependencies: nageru_deps, include_directories: nageru_include_dirs, link_with: [audio, aux]) +executable('benchmark_audio_mixer', 'benchmark_audio_mixer.cpp', dependencies: nageru_deps, include_directories: nageru_include_dirs, link_args: nageru_link_args, link_with: [audio, aux]) # These are needed for a default run. data_files = ['theme.lua', 'simple.lua', 'bg.jpeg', 'akai_midimix.midimapping']