meson: Fix regression in library size
authorsubhransu mohanty <sub.mohanty@samsung.com>
Thu, 18 Jul 2019 01:02:21 +0000 (10:02 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 18 Jul 2019 11:04:28 +0000 (20:04 +0900)
As all the meson variables are in global scope the compiler_flags
in stb module reseted all the optimization flag set in the src directory
which increased the library size by 100KB.

src/meson.build
src/vector/stb/meson.build

index 598ac5e..d8dd0f3 100644 (file)
@@ -1,17 +1,16 @@
+compiler_flags = ['-DLOT_BUILD']
+
 cc = meson.get_compiler('cpp')
-compiler_flags = []
 if (cc.get_id() != 'msvc')
-    compiler_flags = ['-fno-exceptions', '-fno-rtti',
-                      '-fno-unwind-tables' , '-fno-asynchronous-unwind-tables',
-                      '-Woverloaded-virtual', '-Wno-unused-parameter']
+    compiler_flags += ['-fno-exceptions', '-fno-rtti',
+                       '-fno-unwind-tables' , '-fno-asynchronous-unwind-tables',
+                       '-Woverloaded-virtual', '-Wno-unused-parameter']
 endif
 
 subdir('vector')
 subdir('lottie')
 subdir('binding')
 
-compiler_flags += ['-DLOT_BUILD=1']
-
 rlottie_lib_dep  = [ vector_dep, lottie_dep, binding_dep, dependency('threads')]
 
 rlottie_lib = shared_library('rlottie',
index 327b1b1..e04bde7 100644 (file)
@@ -1,8 +1,6 @@
 
 source_file = ['stb_image.cpp']
 
-compiler_flags = ['-DLOT_BUILD=1']
-
 if get_option('module') == true
     rlottie_image_loader_lib = shared_library('rlottie-image-loader',
                                               source_file,