Extend show error/warning as Link

PR #6270 added a parameter which allows the user to decide in case of an error or warning to print the output as a link.
This extension of this option also prints the ARM-GCC output in a link format.
pull/6999/head
PHST 2018-05-23 15:40:00 +02:00
parent 3bcc076c0c
commit 03422a9df5
2 changed files with 5 additions and 3 deletions

View File

@ -86,7 +86,7 @@ class TerminalNotifier(Notifier):
event['severity'] = event['severity'].title()
if PRINT_COMPILER_OUTPUT_AS_LINK:
event['file'] = getcwd() + event['file'].strip('.')
event['file'] = abspath(event['file'])
return '[{severity}] {file}:{line}:{col}: {message}'.format(
**event)
else:

View File

@ -18,7 +18,7 @@ from __future__ import print_function, division, absolute_import
import re
import sys
from os import stat, walk, getcwd, sep, remove
from os import stat, walk, getcwd, sep, remove, path
from copy import copy
from time import time, sleep
from shutil import copyfile
@ -433,7 +433,7 @@ class mbedToolchain:
self.build_all = False
# Build output dir
self.build_dir = build_dir
self.build_dir = path.abspath(build_dir) if PRINT_COMPILER_OUTPUT_AS_LINK else build_dir
self.timestamp = time()
# Number of concurrent build jobs. 0 means auto (based on host system cores)
@ -988,6 +988,8 @@ class mbedToolchain:
_, ext = splitext(source)
ext = ext.lower()
source = abspath(source) if PRINT_COMPILER_OUTPUT_AS_LINK else source
if ext == '.c' or ext == '.cpp':
base, _ = splitext(object)
dep_path = base + '.d'