LLVM 环境变量在哪里或者 LLVM 环境是如何配置的? [英] Where are the LLVM environment variables or how is the LLVM environment configured?

查看:112
本文介绍了LLVM 环境变量在哪里或者 LLVM 环境是如何配置的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

就上下文而言,我有一台 Mac,我在工作中使用它使用各种自定义构建脚本进行开发.我现在正在尝试使用同一台机器来玩一些个人 Xcode 项目.

For context, I have a Mac that I've used for development at my job using various custom build scripts. I'm now attempting to use the same machine to play around with some personal Xcode projects.

作为第一步,我在 Xcode 11.3.1 中创建了一个新的Single View App"项目,并尝试在我连接的 iPhone 设备或 iOS 模拟器上运行它.

As a first step I create a new "Single View App" project in Xcode 11.3.1 and try to run it on my connected iPhone device or iOS Simulator.

我收到以下错误:

错误:替换路径不存在:/path/to/old/work/project/"

据我所知,错误来自 OptionValuePathMappings.cpp 在 LLVM 中

As far as I've been able to figure out the error comes from OptionValuePathMappings.cpp in LLVM

所以它可能在 LLDB 交互式调试器的初始化过程中被命中.

So it's probably hit during initialization of the LLDB interactive debugger.

我想知道替换路径的值从何而来,以找出如何为我的个人项目取消设置.

I'd like to know where the value of the replacement path comes from to figure out how to unset it for my personal projects.

是否有一个命令可以显示 lldb 的启动参数?Xcode如何配置lldb?

Is there a command to display the start-up arguments to lldb? How does Xcode configure lldb?

推荐答案

lldb 有一个设置 - target.source-map 当您从位置 A 的源构建二进制文件时使用它,并且想调试,把source移到B位置,由于调试信息记录的是绝对路径,需要告诉lldb如何将调试信息中的路径映射到当前位置.

lldb has a setting - target.source-map which is used when you have built a binary from sources in location A, and want to debug it with the sources moved to location B. Since the debug information records absolute paths, you need to tell lldb how to map the paths in the debug information to their current location.

该错误警告您,您有一个 target.source-map 设置指向不存在的源目标(位置 B).这将是一个命令,形式为:

The error is warning you that you have a target.source-map setting somewhere that is pointing to a source destination (location B) which doesn't exist. It would be a command, of the form:

settings set target.source-map /Some/Build/Path /path/to/old/work/project

在 Xcode 下运行时,lldb 的用户自定义来自点文件,与命令行 lldb 的方式相同,但命令行 lldb 总是从 ~/.lldbinit 读取,但当在 Xcode 下运行时,它会更喜欢 ~/.lldbinit-Xcode 如果它存在.

When run under Xcode, the user customizations for lldb come from dot-files in the same way command-line lldb does, with the exception that command line lldb always reads from ~/.lldbinit but when run under Xcode, it will prefer ~/.lldbinit-Xcode if it exists.

此设置不是从环境变量中读取的,它必须是在某处发出的直接命令.Xcode 在调试时不会在内部设置这个变量,所以它必须在某个启动文件中.

This setting isn't read from environment variables, it would have to be a direct command issued somewhere. Xcode doesn't set this variable internally when debugging, so it must be in a startup file somewhere.

这篇关于LLVM 环境变量在哪里或者 LLVM 环境是如何配置的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆