diff options
author | Olexa Bilaniuk <obilaniu@gmail.com> | 2021-03-12 18:15:21 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-03-28 20:12:45 +0300 |
commit | 5941e94ff8242591761c634f96efc56e49fedecf (patch) | |
tree | 6be0232b75b50ef56d3a8edd6c527f4934e592a0 /mesonbuild/compilers/cuda.py | |
parent | 3dbd493de218cbecac056fc133e9147a2246a91d (diff) | |
download | meson-5941e94ff8242591761c634f96efc56e49fedecf.zip meson-5941e94ff8242591761c634f96efc56e49fedecf.tar.gz meson-5941e94ff8242591761c634f96efc56e49fedecf.tar.bz2 |
Retract "DQSQ" merging in NVCC arguments handling.
No coverage, no tests, unreadable, unused, likely premature
optimization.
Diffstat (limited to 'mesonbuild/compilers/cuda.py')
-rw-r--r-- | mesonbuild/compilers/cuda.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/mesonbuild/compilers/cuda.py b/mesonbuild/compilers/cuda.py index 1471d84..0ef92b5 100644 --- a/mesonbuild/compilers/cuda.py +++ b/mesonbuild/compilers/cuda.py @@ -218,21 +218,6 @@ class CudaCompiler(Compiler): # strings between them. l = [cls._shield_nvcc_list_arg(s) for s in arg.split(SQ)] l = sum([[s, DQSQ] for s in l][:-1], []) # Interleave l with DQSQs - - # The list l now has the structure of shielded strings interleaved - # with double-quoted single-quotes. - # - # Plain concatenation would result in the tripling of the length of - # a string made up only of single quotes. See if we can merge some - # DQSQs together first. - def isdqsq(x:str) -> bool: - return x.startswith(SQ) and x.endswith(SQ) and x[1:-1].strip(SQ) == '' - for i in range(1, len(l)-2, 2): - if isdqsq(l[i]) and l[i+1] == '' and isdqsq(l[i+2]): - l[i+2] = l[i][:-1]+l[i+2][1:] - l[i] = '' - - # With DQSQs merged, simply concatenate everything together and return. return ''.join(l) else: # A comma is present, and list mode was active. |