[cmake] Strip quotes in try_compile_only
authorHans Wennborg <hans@hanshq.net>
Thu, 19 Sep 2019 11:28:32 +0000 (11:28 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 19 Sep 2019 11:28:32 +0000 (11:28 +0000)
commitec841cf36ca1cb6a154393d7e9f48e8723a38966
tree0ad3ada134c34a32008ac8d7251e016d65dab43a
parentaa03c14827fab3caba6306fc2e5d7f1757230f73
[cmake] Strip quotes in try_compile_only

After r372209, the compile command can end up including an argument with
quotes in it, e.g.

  -fprofile-instr-use="/foo/bar.profdata"

when invoking the compiler with execute_process, the compiler ends up
getting that argument with quotes and all, and fails to open the file.

This all seems horribly broken, but one way of working around it is to
simply strip the quotes from the string here. If they were there to
protect a path that's got spaces in it, that wasn't going to work
anyway because the string is later split by spaces.

llvm-svn: 372312
compiler-rt/cmake/Modules/BuiltinTests.cmake