From 29cab36ddd73c174bf6b2de453663aa49c1cc576 Mon Sep 17 00:00:00 2001 From: Pablo Tello Date: Thu, 10 Mar 2022 17:05:34 +0000 Subject: Fixed clang-cl errors on Windows native builds. Partially resolves MLCE-739 Change-Id: Ice06a96d6a8a26b31e334ba4e697cd41d352b026 Signed-off-by: Pablo Tello Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7364 Comments-Addressed: Arm Jenkins Reviewed-by: Gunes Bayir Benchmark: Arm Jenkins Tested-by: Arm Jenkins --- tests/SConscript | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'tests/SConscript') diff --git a/tests/SConscript b/tests/SConscript index 49bcb8ee1e..8cd13ab914 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -68,7 +68,8 @@ Import("arm_compute_test_framework") test_env.Append(LIBS = arm_compute_test_framework) # Disable floating-point expression contraction (e.g. fused multiply-add operations) -test_env.Append(CXXFLAGS = ['-ffp-contract=off']) +if not 'windows' in env['os']: + test_env.Append(CXXFLAGS = ['-ffp-contract=off']) # Remove -Wnoexcept from tests if 'g++' in test_env['CXX'] and '-Wnoexcept' in test_env['CXXFLAGS']: @@ -84,7 +85,10 @@ if env['os'] in ['android', 'macos', 'bare_metal'] or env['standalone']: Import("arm_compute_a") Import("arm_compute_core_a") Import("arm_compute_graph_a") - test_env.Append(LIBS = [arm_compute_graph_a, arm_compute_a, arm_compute_core_a]) + if env['os']=='windows': + test_env.Append(LIBS = [arm_compute_graph_a, arm_compute_a]) + else: + test_env.Append(LIBS = [arm_compute_graph_a, arm_compute_a, arm_compute_core_a]) arm_compute_lib = arm_compute_graph_a else: Import("arm_compute_graph_so") @@ -157,7 +161,7 @@ if env['neon']: extra_link_flags = [] if env['os'] == 'android': test_env.Append(LIBS = ["log"]) -elif env['os'] not in ['bare_metal', 'macos']: +elif env['os'] not in ['windows','bare_metal', 'macos']: test_env.Append(LIBS = ["rt"]) extra_link_flags += ['-fstack-protector-strong'] @@ -173,7 +177,7 @@ bm_link_flags = [] if test_env['linker_script']: bm_link_flags += ['-Wl,--build-id=none', '-T', env['linker_script']] -if test_env['reference_openmp'] and env['os'] not in ['bare_metal', 'macos']: +if test_env['reference_openmp'] and env['os'] not in ['bare_metal', 'macos','windows']: test_env['CXXFLAGS'].append('-fopenmp') test_env['LINKFLAGS'].append('-fopenmp') @@ -300,4 +304,4 @@ if test_env['benchmark_examples']: Depends(arm_compute_benchmark_examples, arm_compute_test_framework) Depends(arm_compute_benchmark_examples, arm_compute_lib) Default(arm_compute_benchmark_examples) - Export('arm_compute_benchmark_examples') \ No newline at end of file + Export('arm_compute_benchmark_examples') -- cgit v1.2.1