Просмотр исходного кода

Merge dupplicated compile options for wamrc (#2748)

Huang Qi 2 лет назад
Родитель
Сommit
f92630108c

+ 1 - 34
core/iwasm/compilation/aot_llvm.h

@@ -34,6 +34,7 @@
 #endif
 
 #include "aot_orc_extra.h"
+#include "aot_comp_option.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -497,40 +498,6 @@ enum {
     AOT_LLVMIR_OPT_FILE,
 };
 
-typedef struct AOTCompOption {
-    bool is_jit_mode;
-    bool is_indirect_mode;
-    char *target_arch;
-    char *target_abi;
-    char *target_cpu;
-    char *cpu_features;
-    bool is_sgx_platform;
-    bool enable_bulk_memory;
-    bool enable_thread_mgr;
-    bool enable_tail_call;
-    bool enable_simd;
-    bool enable_ref_types;
-    bool enable_aux_stack_check;
-    bool enable_aux_stack_frame;
-    bool disable_llvm_intrinsics;
-    bool disable_llvm_lto;
-    bool enable_llvm_pgo;
-    bool enable_stack_estimation;
-    bool enable_gc;
-    char *use_prof_file;
-    uint32 opt_level;
-    uint32 size_level;
-    uint32 output_format;
-    uint32 bounds_checks;
-    uint32 stack_bounds_checks;
-    uint32 segue_flags;
-    char **custom_sections;
-    uint32 custom_sections_count;
-    const char *stack_usage_file;
-    const char *llvm_passes;
-    const char *builtin_intrinsics;
-} AOTCompOption, *aot_comp_option_t;
-
 bool
 aot_compiler_init(void);
 

+ 43 - 0
core/iwasm/include/aot_comp_option.h

@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2019 Intel Corporation. All rights reserved.
+ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+ */
+
+#ifndef __AOT_COMP_OPTION_H__
+#define __AOT_COMP_OPTION_H__
+
+typedef struct AOTCompOption {
+    bool is_jit_mode;
+    bool is_indirect_mode;
+    char *target_arch;
+    char *target_abi;
+    char *target_cpu;
+    char *cpu_features;
+    bool is_sgx_platform;
+    bool enable_bulk_memory;
+    bool enable_thread_mgr;
+    bool enable_tail_call;
+    bool enable_simd;
+    bool enable_ref_types;
+    bool enable_aux_stack_check;
+    bool enable_aux_stack_frame;
+    bool disable_llvm_intrinsics;
+    bool disable_llvm_lto;
+    bool enable_llvm_pgo;
+    bool enable_stack_estimation;
+    bool enable_gc;
+    char *use_prof_file;
+    uint32_t opt_level;
+    uint32_t size_level;
+    uint32_t output_format;
+    uint32_t bounds_checks;
+    uint32_t stack_bounds_checks;
+    uint32_t segue_flags;
+    char **custom_sections;
+    uint32_t custom_sections_count;
+    const char *stack_usage_file;
+    const char *llvm_passes;
+    const char *builtin_intrinsics;
+} AOTCompOption, *aot_comp_option_t;
+
+#endif

+ 2 - 34
core/iwasm/include/aot_export.h

@@ -9,6 +9,8 @@
 #include <stdint.h>
 #include <stdbool.h>
 
+#include "aot_comp_option.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -38,40 +40,6 @@ enum {
     AOT_LLVMIR_OPT_FILE,
 };
 
-typedef struct AOTCompOption {
-    bool is_jit_mode;
-    bool is_indirect_mode;
-    char *target_arch;
-    char *target_abi;
-    char *target_cpu;
-    char *cpu_features;
-    bool is_sgx_platform;
-    bool enable_bulk_memory;
-    bool enable_thread_mgr;
-    bool enable_tail_call;
-    bool enable_simd;
-    bool enable_ref_types;
-    bool enable_aux_stack_check;
-    bool enable_aux_stack_frame;
-    bool disable_llvm_intrinsics;
-    bool disable_llvm_lto;
-    bool enable_llvm_pgo;
-    bool enable_stack_estimation;
-    bool enable_gc;
-    char *use_prof_file;
-    uint32_t opt_level;
-    uint32_t size_level;
-    uint32_t output_format;
-    uint32_t bounds_checks;
-    uint32_t stack_bounds_checks;
-    uint32_t segue_flags;
-    char **custom_sections;
-    uint32_t custom_sections_count;
-    const char *stack_usage_file;
-    const char *llvm_passes;
-    const char *builtin_intrinsics;
-} AOTCompOption, *aot_comp_option_t;
-
 bool
 aot_compiler_init(void);