Skip to content

Commit 037a0d3

Browse files
authored
Be able to compile in offline mode (#7305)
1 parent cb04347 commit 037a0d3

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.hypothesis
22
buck-out/
3+
buck2-bin/
34
cmake-out*
45
.DS_Store
56
cmake-android-out/

CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,17 @@ if(EXECUTORCH_BUILD_KERNELS_CUSTOM)
257257
set(EXECUTORCH_BUILD_KERNELS_OPTIMIZED ON)
258258
endif()
259259

260+
if(NOT DEFINED FXDIV_SOURCE_DIR)
261+
set(ORIGINAL_CMAKE_POSITION_INDEPENDENT_CODE_FLAG
262+
${CMAKE_POSITION_INDEPENDENT_CODE}
263+
)
264+
set(FXDIV_SOURCE_DIR "backends/xnnpack/third-party/FXdiv")
265+
add_subdirectory("${FXDIV_SOURCE_DIR}")
266+
set(CMAKE_POSITION_INDEPENDENT_CODE
267+
${ORIGINAL_CMAKE_POSITION_INDEPENDENT_CODE_FLAG}
268+
)
269+
endif()
270+
260271
if(EXECUTORCH_BUILD_CPUINFO)
261272
# --- cpuinfo
262273
set(ORIGINAL_CMAKE_POSITION_INDEPENDENT_CODE_FLAG

build/Utils.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ function(resolve_buck2)
235235

236236
set(resolve_buck2_command
237237
${PYTHON_EXECUTABLE} ${executorch_root}/build/resolve_buck.py
238-
--cache_dir=${CMAKE_CURRENT_BINARY_DIR}/buck2-bin
238+
--cache_dir=buck2-bin
239239
)
240240

241241
if(NOT ${BUCK2} STREQUAL "")

0 commit comments

Comments
 (0)