builder: detect compiler-rt size usage
Previously the code size of the compiler-rt library might be displayed like this: ``` 1050 0 0 0 | 1050 0 | /home/ayke/src/tinygo/tinygo/llvm-project/compiler-rt/lib/builtins 146 0 0 0 | 146 0 | /home/ayke/src/tinygo/tinygo/llvm-project/compiler-rt/lib/builtins/arm ``` With this change, it is displayed nicely like this: ``` 1196 0 0 0 | 1196 0 | C compiler-rt ```
Этот коммит содержится в:
родитель
fc28f513c7
коммит
de281191e0
1 изменённых файлов: 2 добавлений и 0 удалений
|
@ -829,6 +829,8 @@ func findPackagePath(path string, packagePathMap map[string]string) string {
|
||||||
// package, with a "C" prefix. For example: "C compiler-rt" for the
|
// package, with a "C" prefix. For example: "C compiler-rt" for the
|
||||||
// compiler runtime library from LLVM.
|
// compiler runtime library from LLVM.
|
||||||
packagePath = "C " + strings.Split(strings.TrimPrefix(path, filepath.Join(goenv.Get("TINYGOROOT"), "lib")), string(os.PathSeparator))[1]
|
packagePath = "C " + strings.Split(strings.TrimPrefix(path, filepath.Join(goenv.Get("TINYGOROOT"), "lib")), string(os.PathSeparator))[1]
|
||||||
|
} else if strings.HasPrefix(path, filepath.Join(goenv.Get("TINYGOROOT"), "llvm-project")) {
|
||||||
|
packagePath = "C compiler-rt"
|
||||||
} else if packageSymbolRegexp.MatchString(path) {
|
} else if packageSymbolRegexp.MatchString(path) {
|
||||||
// Parse symbol names like main$alloc or runtime$string.
|
// Parse symbol names like main$alloc or runtime$string.
|
||||||
packagePath = path[:strings.LastIndex(path, "$")]
|
packagePath = path[:strings.LastIndex(path, "$")]
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче