Buck中常见的平台名称有哪些?
What are the common platform names in Buck?
我想用 buck. I have different cpp
files for the different platforms. According to the docs 构建一个跨平台 cxx_library
,我可以使用 platform_srcs
来处理这个问题,即:
...a list of pairs where the first element is an un-anchored regex (in java.util.regex.Pattern syntax) against which the platform name is matched".
- 这些平台名称是什么样的?
- 我可以将哪些正则表达式示例用于 OSX、Windows 和 Linux?
Android: android
iPhone: iphoneos
iPhone模拟器:iphonesimulator
Linux:不确定
OSX:不确定
Windows: ^windows.*
我正在使用以下内容:
- Android:
android.*
- iPhone:
iphoneos.*
- iPhone模拟器:
iphonesimulator*
- Linux:
linux.*
- macOS:
macos.*
- Windows:
windows.*
不要忘记打开 should_remap_host_platform
以避免 'default'
平台异常。在你的 .buckconfig
:
[cxx]
should_remap_host_platform = true
我想用 buck. I have different cpp
files for the different platforms. According to the docs 构建一个跨平台 cxx_library
,我可以使用 platform_srcs
来处理这个问题,即:
...a list of pairs where the first element is an un-anchored regex (in java.util.regex.Pattern syntax) against which the platform name is matched".
- 这些平台名称是什么样的?
- 我可以将哪些正则表达式示例用于 OSX、Windows 和 Linux?
Android: android
iPhone: iphoneos
iPhone模拟器:iphonesimulator
Linux:不确定
OSX:不确定
Windows: ^windows.*
我正在使用以下内容:
- Android:
android.*
- iPhone:
iphoneos.*
- iPhone模拟器:
iphonesimulator*
- Linux:
linux.*
- macOS:
macos.*
- Windows:
windows.*
不要忘记打开 should_remap_host_platform
以避免 'default'
平台异常。在你的 .buckconfig
:
[cxx]
should_remap_host_platform = true