diff options
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct index ab55daaaa3..985f34c6cd 100644 --- a/SConstruct +++ b/SConstruct @@ -65,6 +65,7 @@ vars.AddVariables( #FIXME Remove before release (And remove all references to INTERNAL_ONLY) BoolVariable("internal_only", "Enable ARM internal only tests", False), ListVariable("custom_options", "Custom options that can be used to turn on/off features", "none", ["disable_mmla_fp"]), + ListVariable("data_type_support", "Enable a list of data types to support", "all", ["fp16", "fp32"]), ("toolchain_prefix", "Override the toolchain prefix", ""), ("compiler_prefix", "Override the compiler prefix", ""), ("extra_cxx_flags", "Extra CXX flags to be appended to the build command", ""), @@ -282,6 +283,12 @@ if not GetOption("help"): if compiler_ver == '4.8.3': env.Append(CXXFLAGS = ['-Wno-array-bounds']) +if env['data_type_support']: + if any(i in env['data_type_support'] for i in ['all', 'fp16']): + env.Append(CXXFLAGS = ['-DENABLE_FP16_KERNELS']) + if any(i in env['data_type_support'] for i in ['all', 'fp32']): + env.Append(CXXFLAGS = ['-DENABLE_FP32_KERNELS']) + if env['standalone']: env.Append(CXXFLAGS = ['-fPIC']) env.Append(LINKFLAGS = ['-static-libgcc','-static-libstdc++']) @@ -343,7 +350,6 @@ for dirname in os.listdir("./include"): Export('version_at_least') - if env['gles_compute'] and env['os'] != 'android': env.Append(CPPPATH = ['#/include/linux']) |