Browse Source

wasm_export.h Function Description & SGX SDK Include path (#279)

* Missing SGX SDK Include fixed

* Update shared_platform.cmake

* CMakeFile remove stdlib from untrusted part

* Added two times in function description zero as possible return value

* Update shared_platform.cmake

Co-authored-by: Joshua Heinemann <heineman@ibr.cs.tu-bs.de>
Co-authored-by: wenyongh <wenyong.huang@intel.com>
J-Heinemann 5 years ago
parent
commit
f4d4d69736

+ 2 - 2
core/iwasm/include/wasm_export.h

@@ -319,7 +319,7 @@ wasm_runtime_lookup_wasi_start_function(wasm_module_inst_t module_inst);
  * @param name the name of the function
  * @param name the name of the function
  * @param signature the signature of the function, ignored currently
  * @param signature the signature of the function, ignored currently
  *
  *
- * @return the function instance found
+ * @return the function instance found. Otherwise NULL will be returned.
  */
  */
 wasm_function_inst_t
 wasm_function_inst_t
 wasm_runtime_lookup_function(wasm_module_inst_t const module_inst,
 wasm_runtime_lookup_function(wasm_module_inst_t const module_inst,
@@ -331,7 +331,7 @@ wasm_runtime_lookup_function(wasm_module_inst_t const module_inst,
  * @param module_inst the module instance
  * @param module_inst the module instance
  * @param stack_size the stack size to execute a WASM function
  * @param stack_size the stack size to execute a WASM function
  *
  *
- * @return the execution environment
+ * @return the execution environment. In case of invalid stack size, NULL will be returned.
  */
  */
 wasm_exec_env_t
 wasm_exec_env_t
 wasm_runtime_create_exec_env(wasm_module_inst_t module_inst,
 wasm_runtime_create_exec_env(wasm_module_inst_t module_inst,

+ 5 - 3
core/shared/platform/linux-sgx/shared_platform.cmake

@@ -14,9 +14,11 @@ else()
   set (SGX_SDK_DIR $ENV{SGX_SDK})
   set (SGX_SDK_DIR $ENV{SGX_SDK})
 endif()
 endif()
 
 
-include_directories (${SGX_SDK_DIR}/include
-                     ${SGX_SDK_DIR}/include/tlibc
-                     ${SGX_SDK_DIR}/include/libcxx)
+include_directories (${SGX_SDK_DIR}/include)
+if (NOT BUILD_UNTRUST_PART EQUAL 1)
+  include_directories (${SGX_SDK_DIR}/include/tlibc
+                       ${SGX_SDK_DIR}/include/libcxx)
+endif ()
 
 
 file (GLOB_RECURSE source_all ${PLATFORM_SHARED_DIR}/*.c)
 file (GLOB_RECURSE source_all ${PLATFORM_SHARED_DIR}/*.c)