diff options
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r-- | mesonbuild/compilers/c.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 323e855..1bc4dfd 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import subprocess, os.path +import subprocess, os.path, ast from .. import mlog from .. import coredata @@ -567,8 +567,9 @@ class CCompiler(Compiler): if p.returncode != 0: raise EnvironmentException('Could not get define {!r}'.format(dname)) # Get the preprocessed value after the delimiter, - # minus the extra newline at the end - return p.stdo.split(delim + '\n')[-1][:-1] + # minus the extra newline at the end and + # merge string literals. + return ast.literal_eval(p.stdo.split(delim + '\n')[-1][:-1]) def get_return_value(self, fname, rtype, prefix, env, extra_args, dependencies): if rtype == 'string': |