@@ -29,7 +29,10 @@ endif()
2929set (_common_compile_options -Wno-deprecated-declarations -fPIC)
3030
3131# Let files say "include <executorch/path/to/header.h>".
32- set (_common_include_directories ${EXECUTORCH_ROOT} /..)
32+ set (_common_include_directories ${EXECUTORCH_ROOT} /..
33+ ${EXECUTORCH_ROOT} /runtime/core/portable_type/c10
34+ ${EXECUTORCH_ROOT} /extension/llm/tokenizers/include
35+ ${EXECUTORCH_ROOT} /extension/llm/tokenizers/third-party/json/single_include)
3336
3437#
3538# The `_<target>_srcs` lists are defined by including ${EXECUTORCH_SRCS_FILE}.
@@ -71,9 +74,13 @@ if(${ANDROID})
7174
7275 target_link_libraries (
7376 mtk_executor_runner ${_executor_runner_libs} executorch neuron_backend
77+ executorch_core
78+ extension_evalue_util
79+ extension_runner_util
7480 gflags
7581 )
7682 target_compile_options (mtk_executor_runner PUBLIC ${_common_compile_options} )
83+ add_compile_definitions (C10_USING_CUSTOM_GENERATED_MACROS)
7784
7885 set (_mtk_oss_executor_runner__srcs ${_executor_runner__srcs} )
7986 list (
@@ -104,6 +111,7 @@ if(${ANDROID})
104111
105112 target_link_libraries (mtk_oss_executor_runner
106113 ${_executor_runner_libs}
114+ extension_module
107115 executorch
108116 neuron_backend
109117 gflags
@@ -142,13 +150,18 @@ if(${ANDROID})
142150 target_include_directories (
143151 tokenizer PUBLIC ${_common_include_directories} ${THIRD_PARTY_ABSL_DIR}
144152 ${THIRD_PARTY_RE2_DIR} ${LLAMA2_TOKENIZER_DIR} /include
153+ ${CMAKE_CURRENT_BINARY_DIR} /tokenizers/third-party/pcre2
154+ ${EXECUTORCH_ROOT} /extension/llm/tokenizers/include
145155 )
146156 target_link_libraries (tokenizer PRIVATE re2::re2)
147157 target_sources (
148158 tokenizer
149159 PRIVATE
150160 ${LLAMA2_TOKENIZER_DIR} /src/tiktoken.cpp
151161 ${LLAMA2_TOKENIZER_DIR} /src/llama2c_tokenizer.cpp
162+ ${LLAMA2_TOKENIZER_DIR} /src/regex .cpp
163+ ${LLAMA2_TOKENIZER_DIR} /src/bpe_tokenizer_base.cpp
164+ ${LLAMA2_TOKENIZER_DIR} /src/re2_regex.cpp
152165 ${CMAKE_CURRENT_SOURCE_DIR} /../models/llama/tokenizer/llama_tiktoken.cpp
153166 )
154167
0 commit comments