Allow tfcompile_flags to be a list (#12769)
* Allow tfcompile_flags to be a list This fix tries to fix the issue raised in 12767 where it was not possible to specify tfcompile_flags as a list: ``` tf_library( ... tfcompile_flags = ["--target_cpu='core-avx2'", "--xla_enable_fast_math=false"] ) ``` will crash upon build with '+' operator applied to incompatible types (select of string, list) This is inconsistent with other rules like 'copts' in cc_binary. The issue is from tfcompile.bzl: ``` " " + (tfcompile_flags or "")), ``` This fix uses `" ".join(tfcompile_flags or [])` instead so that it is possible to specify the list. This fix fixes 12767. Signed-off-by:Yong Tang <yong.tang.github@outlook.com> * Add support of string for tfcompile_flags so that backward compatibility could be maintained. Signed-off-by:
Yong Tang <yong.tang.github@outlook.com>
Loading
Please sign in to comment