Lines Matching refs:arguments
160 arguments = parser.parse_args(args)
161 if arguments.devhelp:
165 return arguments
167 def generate_build_options(arguments):
175 build_options_append('CMAKE_BUILD_TYPE', arguments.build_type)
176 build_options_append('EXTERNAL_COMPILE_FLAGS', ' '.join(arguments.compile_flag))
177 build_options_append('EXTERNAL_LINK_LIBS', ' '.join(arguments.link_lib))
178 build_options_append('EXTERNAL_LINKER_FLAGS', ' '.join(arguments.linker_flag))
179 build_options_append('ENABLE_LTO', arguments.lto)
180 build_options_append('BUILD_SHARED_LIBS', arguments.shared_libs)
181 build_options_append('ENABLE_STRIP', arguments.strip)
182 build_options_append('CMAKE_TOOLCHAIN_FILE', arguments.toolchain)
183 build_options_append('CMAKE_VERBOSE_MAKEFILE', arguments.verbose)
186 build_options_append('DOCTESTS', arguments.doctests)
187 build_options_append('JERRY_CMDLINE', arguments.jerry_cmdline)
188 build_options_append('JERRY_CMDLINE_SNAPSHOT', arguments.jerry_cmdline_snapshot)
189 build_options_append('JERRY_CMDLINE_TEST', arguments.jerry_cmdline_test)
190 build_options_append('JERRY_LIBFUZZER', arguments.libfuzzer)
191 build_options_append('JERRY_EXT', arguments.jerry_ext)
192 build_options_append('JERRY_LIBM', arguments.jerry_libm)
193 build_options_append('JERRY_PORT_DEFAULT', arguments.jerry_port_default)
194 build_options_append('UNITTESTS', arguments.unittests)
197 build_options_append('ENABLE_ALL_IN_ONE', arguments.all_in_one)
198 build_options_append('JERRY_CPOINTER_32_BIT', arguments.cpointer_32bit)
199 build_options_append('JERRY_ERROR_MESSAGES', arguments.error_messages)
200 build_options_append('JERRY_EXTERNAL_CONTEXT', arguments.external_context)
201 build_options_append('JERRY_DEBUGGER', arguments.jerry_debugger)
202 build_options_append('JERRY_PARSER', arguments.js_parser)
203 build_options_append('JERRY_LINE_INFO', arguments.line_info)
204 build_options_append('JERRY_LOGGING', arguments.logging)
205 build_options_append('JERRY_GLOBAL_HEAP_SIZE', arguments.mem_heap)
206 build_options_append('JERRY_GC_LIMIT', arguments.gc_limit)
207 build_options_append('JERRY_STACK_LIMIT', arguments.stack_limit)
208 build_options_append('JERRY_MEM_STATS', arguments.mem_stats)
209 build_options_append('JERRY_MEM_GC_BEFORE_EACH_ALLOC', arguments.mem_stress_test)
210 build_options_append('JERRY_PROFILE', arguments.profile)
211 build_options_append('JERRY_REGEXP_STRICT_MODE', arguments.regexp_strict_mode)
212 build_options_append('JERRY_PARSER_DUMP_BYTE_CODE', arguments.show_opcodes)
213 build_options_append('JERRY_REGEXP_DUMP_BYTE_CODE', arguments.show_regexp_opcodes)
214 build_options_append('JERRY_SNAPSHOT_EXEC', arguments.snapshot_exec)
215 build_options_append('JERRY_SNAPSHOT_SAVE', arguments.snapshot_save)
216 build_options_append('JERRY_SYSTEM_ALLOCATOR', arguments.system_allocator)
217 build_options_append('JERRY_VALGRIND', arguments.valgrind)
218 build_options_append('JERRY_VM_EXEC_STOP', arguments.vm_exec_stop)
220 if arguments.gc_mark_limit is not None:
221 build_options.append('-D%s=%s' % ('JERRY_GC_MARK_LIMIT', arguments.gc_mark_limit))
224 build_options_append('ENABLE_LINK_MAP', arguments.link_map)
227 if arguments.cmake_param:
228 build_options.extend(arguments.cmake_param)
232 def configure_output_dir(arguments):
233 if not os.path.isabs(arguments.builddir):
234 arguments.builddir = os.path.join(settings.PROJECT_DIR, arguments.builddir)
236 if arguments.clean and os.path.exists(arguments.builddir):
237 shutil.rmtree(arguments.builddir)
239 if not os.path.exists(arguments.builddir):
240 os.makedirs(arguments.builddir)
242 def configure_jerry(arguments):
243 configure_output_dir(arguments)
245 build_options = generate_build_options(arguments)
247 cmake_cmd = ['cmake', '-B' + arguments.builddir, '-H' + settings.PROJECT_DIR]
249 if arguments.install:
250 cmake_cmd.append('-DCMAKE_INSTALL_PREFIX=%s' % arguments.install)
256 def make_jerry(arguments):
257 make_cmd = ['cmake', '--build', arguments.builddir, '--config', arguments.build_type]
259 env['CMAKE_BUILD_PARALLEL_LEVEL'] = str(arguments.jobs)
260 env['MAKEFLAGS'] = '-j%d' % (arguments.jobs) # Workaround for CMake < 3.12
266 def install_jerry(arguments):
268 make_cmd = ['cmake', '--build', arguments.builddir, '--config', arguments.build_type, '--target', install_target]
280 arguments = get_arguments()
282 ret = configure_jerry(arguments)
285 ret = make_jerry(arguments)
287 if not ret and arguments.install is not None:
288 ret = install_jerry(arguments)