aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2017-12-05 15:28:55 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:42:17 +0000
commit9873ea3f1ea238ba7abfb635807614517c52be4b (patch)
treef9e7e025fc905de39296a4832a02397e666720b0 /examples
parentb8ab99788c3310800880346b1a935361e9974fa9 (diff)
downloadComputeLibrary-9873ea3f1ea238ba7abfb635807614517c52be4b.tar.gz
COMPMID-556: Revert COMPMID-652
Revert back to static linkage for android as dynamic linkage causes error within libc++ Change-Id: I448dd5ff4e527b81d702e331bd070101431fb7de Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/111995 Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com <bsgcomp@arm.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/SConscript26
-rw-r--r--examples/graph_alexnet.cpp1
-rw-r--r--examples/graph_googlenet.cpp1
-rw-r--r--examples/graph_lenet.cpp1
-rw-r--r--examples/graph_mobilenet.cpp1
-rw-r--r--examples/graph_squeezenet.cpp1
-rw-r--r--examples/graph_vgg19.cpp1
7 files changed, 19 insertions, 13 deletions
diff --git a/examples/SConscript b/examples/SConscript
index e002d11edd..3357ccaf33 100644
--- a/examples/SConscript
+++ b/examples/SConscript
@@ -42,7 +42,7 @@ if env['gles_compute'] and env['os'] != 'android':
# Build examples
utils = examples_env.Object("../utils/Utils.cpp")
-if env['os'] in ['bare_metal'] or env['standalone']:
+if env['os'] in ['android', 'bare_metal'] or env['standalone']:
Import('arm_compute_a')
Import('arm_compute_core_a')
arm_compute_libs = [ arm_compute_a, arm_compute_core_a ]
@@ -59,16 +59,28 @@ if env['opencl'] and env['neon']:
Depends(prog, [arm_compute_dependency, opencl])
alias = examples_env.Alias(example, prog)
Default(alias)
- Import('arm_compute_graph_so')
- arm_compute_graph_libs = ["arm_compute_graph", "arm_compute", "arm_compute_core"]
- graph_dependency = arm_compute_graph_so
+ if env['os'] == 'android':
+ Import('arm_compute_graph_a')
+ Import('arm_compute_core_a')
+ Import('arm_compute_a')
+ arm_compute_graph_libs = [ arm_compute_graph_a, arm_compute_a, arm_compute_core_a, "OpenCL"]
+ graph_dependency = arm_compute_graph_a
+ else:
+ Import('arm_compute_graph_so')
+ arm_compute_graph_libs = ["arm_compute_graph", "arm_compute", "arm_compute_core"]
+ graph_dependency = arm_compute_graph_so
graph_utils = examples_env.Object("../utils/GraphUtils.cpp")
for file in Glob("./graph_*.cpp"):
example = os.path.basename(os.path.splitext(str(file))[0])
- #-Wl,--allow-shlib-undefined: Ignore dependencies of dependencies
- prog = examples_env.Program(example, ["{}.cpp".format(example), utils, graph_utils], LIBS = arm_compute_graph_libs, LINKFLAGS=examples_env["LINKFLAGS"]+['-Wl,--allow-shlib-undefined'] )
- Depends(prog, graph_dependency)
+ prog = None
+ if env['os'] == 'android':
+ prog = examples_env.Program(example, ["{}.cpp".format(example), utils, graph_utils], LIBS = arm_compute_graph_libs + ["OpenCL"])
+ Depends(prog, [graph_dependency, opencl])
+ else:
+ #-Wl,--allow-shlib-undefined: Ignore dependencies of dependencies
+ prog = examples_env.Program(example, ["{}.cpp".format(example), utils, graph_utils], LIBS = arm_compute_graph_libs, LINKFLAGS=examples_env["LINKFLAGS"]+['-Wl,--allow-shlib-undefined'] )
+ Depends(prog, graph_dependency)
alias = examples_env.Alias(example, prog)
Default(alias)
diff --git a/examples/graph_alexnet.cpp b/examples/graph_alexnet.cpp
index 2d2ba6bb11..534ee45bcd 100644
--- a/examples/graph_alexnet.cpp
+++ b/examples/graph_alexnet.cpp
@@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
#include "arm_compute/graph/Graph.h"
#include "arm_compute/graph/Nodes.h"
#include "support/ToolchainSupport.h"
diff --git a/examples/graph_googlenet.cpp b/examples/graph_googlenet.cpp
index e116633a02..b7ff4e4bf0 100644
--- a/examples/graph_googlenet.cpp
+++ b/examples/graph_googlenet.cpp
@@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
#include "arm_compute/graph/Graph.h"
#include "arm_compute/graph/Nodes.h"
#include "arm_compute/graph/SubGraph.h"
diff --git a/examples/graph_lenet.cpp b/examples/graph_lenet.cpp
index f6af14c4cf..ad4a4e02c7 100644
--- a/examples/graph_lenet.cpp
+++ b/examples/graph_lenet.cpp
@@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
#include "arm_compute/graph/Graph.h"
#include "arm_compute/graph/Nodes.h"
#include "support/ToolchainSupport.h"
diff --git a/examples/graph_mobilenet.cpp b/examples/graph_mobilenet.cpp
index 2b2da9e517..081fae67e2 100644
--- a/examples/graph_mobilenet.cpp
+++ b/examples/graph_mobilenet.cpp
@@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
#include "arm_compute/graph/Graph.h"
#include "arm_compute/graph/Nodes.h"
#include "support/ToolchainSupport.h"
diff --git a/examples/graph_squeezenet.cpp b/examples/graph_squeezenet.cpp
index 51c4de0ec1..1743509256 100644
--- a/examples/graph_squeezenet.cpp
+++ b/examples/graph_squeezenet.cpp
@@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
#include "arm_compute/graph/Graph.h"
#include "arm_compute/graph/Nodes.h"
#include "arm_compute/graph/SubGraph.h"
diff --git a/examples/graph_vgg19.cpp b/examples/graph_vgg19.cpp
index 61bb9a5190..a39e255ad0 100644
--- a/examples/graph_vgg19.cpp
+++ b/examples/graph_vgg19.cpp
@@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-
#include "arm_compute/graph/Graph.h"
#include "arm_compute/graph/Nodes.h"
#include "support/ToolchainSupport.h"