aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorSergej Jaskiewicz <jaskiewiczs@icloud.com>2020-07-09 19:36:15 +0300
committerSergej Jaskiewicz <jaskiewiczs@icloud.com>2020-07-09 19:40:22 +0300
commita89d54fd61a6e7a05f7434491135e667306a22e7 (patch)
tree3904de19eff4ded60239bb4fcbaefec61accaad9 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parentafc1a709433e3754ee3819efd9e144b657919131 (diff)
downloadllvm-a89d54fd61a6e7a05f7434491135e667306a22e7.zip
llvm-a89d54fd61a6e7a05f7434491135e667306a22e7.tar.gz
llvm-a89d54fd61a6e7a05f7434491135e667306a22e7.tar.bz2
[compiler-rt] Better Windows support for running tests in external shell
Summary: These changes are necessary to support remote running compiler-rt tests that were compiled on Windows. Most of the code here has been copy-pasted from other lit configs. Why do we remove the conversions to ASCII in the crt config? We set the `universal_newlines` argument to `True` in `Popen` instead. This is supported in both Python 2.7 and 3, is easier (no need to do the `str(dir.decode('ascii'))` dance) and less error prone. Also, this is necessary because if the config is executed on Windows, and `execute_external` is `True`, we take the branch `if sys.platform in ['win32'] and execute_external`, and if we use Python 3, then the `dir` variable is a byte-like object, not str, but the ``replace method on byte-like objects requires its arguments to also be byte-like objects, which is incompatible with Python 2 etc etc. It is a lot simpler to just work with strings in the first place, which is achieved by setting `universal_newlines` to `True`. As far as I understand, this way wasn't taken because of the need to support Python <2.7, but this is not the case now. Reviewers: compnerd, phosek, weimingz Reviewed By: compnerd Subscribers: dberris, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D83485
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions