mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 00:19:58 +01:00
update configure.py
This commit is contained in:
parent
65d46501f7
commit
3f2e1e54a8
16
configure.py
16
configure.py
|
|
@ -806,6 +806,16 @@ def choose_compiler(environ_cp):
|
|||
)
|
||||
return var
|
||||
|
||||
def choose_compiler_Win(environ_cp):
|
||||
question = 'Do you want to use Clang to build TensorFlow?'
|
||||
yes_reply = 'Please use "--config=win_clang" to compile TensorFlow with CLANG.'
|
||||
no_reply = 'MSVC will be used to compile TensorFlow.'
|
||||
var = int(
|
||||
get_var(
|
||||
environ_cp, 'TF_NEED_CLANG', None, True, question, yes_reply, no_reply
|
||||
)
|
||||
)
|
||||
return var
|
||||
|
||||
def set_clang_compiler_path(environ_cp):
|
||||
"""Set CLANG_COMPILER_PATH and environment variables.
|
||||
|
|
@ -1415,6 +1425,12 @@ def main():
|
|||
clang_compiler_path = set_clang_compiler_path(environ_cp)
|
||||
clang_version = retrieve_clang_version(clang_compiler_path)
|
||||
disable_clang_offsetof_extension(clang_version)
|
||||
if is_windows():
|
||||
environ_cp['TF_NEED_CLANG'] = str(choose_compiler_Win(environ_cp))
|
||||
if environ_cp.get('TF_NEED_CLANG') == '1':
|
||||
clang_compiler_path = set_clang_compiler_path(environ_cp)
|
||||
clang_version = retrieve_clang_version(clang_compiler_path)
|
||||
disable_clang_offsetof_extension(clang_version)
|
||||
|
||||
# ROCm / CUDA are mutually exclusive.
|
||||
# At most 1 GPU platform can be configured.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user