From 1cf3da32251fe0d293f926276ac1d108e8b32eeb Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Thu, 26 Sep 2024 11:15:37 -0700 Subject: [PATCH] Fix linker flags. (#5689) Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/5689 We have to force load the optimized kernels first to avoid conflicts with portable. Reviewed By: guangy10 Differential Revision: D63473757 fbshipit-source-id: d472e360bb90885b3ea0f8c01bf7fb791f1003c0 --- extension/apple/Benchmark/Tests/Tests.xcconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extension/apple/Benchmark/Tests/Tests.xcconfig b/extension/apple/Benchmark/Tests/Tests.xcconfig index 838cc61a43..3c5ca95471 100644 --- a/extension/apple/Benchmark/Tests/Tests.xcconfig +++ b/extension/apple/Benchmark/Tests/Tests.xcconfig @@ -4,7 +4,7 @@ OTHER_LDFLAGS[sdk=iphonesimulator*] = $(inherited) \ -force_load $(BUILT_PRODUCTS_DIR)/libbackend_mps-simulator-release.a \ -force_load $(BUILT_PRODUCTS_DIR)/libbackend_xnnpack-simulator-release.a \ -force_load $(BUILT_PRODUCTS_DIR)/libkernels_custom-simulator-release.a \ --force_load $(BUILT_PRODUCTS_DIR)/libkernels_portable-simulator-release.a \ +-force_load $(BUILT_PRODUCTS_DIR)/libkernels_optimized-simulator-release.a \ -force_load $(BUILT_PRODUCTS_DIR)/libkernels_quantized-simulator-release.a OTHER_LDFLAGS[sdk=iphoneos*] = $(inherited) \ @@ -13,7 +13,7 @@ OTHER_LDFLAGS[sdk=iphoneos*] = $(inherited) \ -force_load $(BUILT_PRODUCTS_DIR)/libbackend_mps-ios-release.a \ -force_load $(BUILT_PRODUCTS_DIR)/libbackend_xnnpack-ios-release.a \ -force_load $(BUILT_PRODUCTS_DIR)/libkernels_custom-ios-release.a \ --force_load $(BUILT_PRODUCTS_DIR)/libkernels_portable-ios-release.a \ +-force_load $(BUILT_PRODUCTS_DIR)/libkernels_optimized-ios-release.a \ -force_load $(BUILT_PRODUCTS_DIR)/libkernels_quantized-ios-release.a OTHER_LDFLAGS[sdk=macos*] = $(inherited) \ @@ -22,5 +22,5 @@ OTHER_LDFLAGS[sdk=macos*] = $(inherited) \ -force_load $(BUILT_PRODUCTS_DIR)/libbackend_mps-macos-release.a \ -force_load $(BUILT_PRODUCTS_DIR)/libbackend_xnnpack-macos-release.a \ -force_load $(BUILT_PRODUCTS_DIR)/libkernels_custom-macos-release.a \ --force_load $(BUILT_PRODUCTS_DIR)/libkernels_portable-macos-release.a \ +-force_load $(BUILT_PRODUCTS_DIR)/libkernels_optimized-macos-release.a \ -force_load $(BUILT_PRODUCTS_DIR)/libkernels_quantized-macos-release.a