llvm

Unable to install LLVM toolchain for Eclipse CDT

前提是你 提交于 2019-12-17 18:21:43
问题 Im trying to get Clang working again on Eclipse and therefore I've tried to install the LLVM toolchain over the Eclipse Marketplace. But when I click Confirm to procceed with the installation I get the following error Unable to read repository at http://petrituononen.com/llvm4eclipsecdt/update. http://petrituononen.com/llvm4eclipsecdt/update is not a valid repository location. This site seems to be down but I cant find any alternative sources. Is there any way to get Clang working on Eclipse

pragma pack(1) nor __attribute__ ((aligned (1))) works

你。 提交于 2019-12-17 18:18:14
问题 My code used to work in the past, but now the struct size suddenly is 16 bytes. It used to be 13 bytes. I recently upgraded from Xcode 4.2 to Xcode 4.3.1 (4E1019). #pragma pack(1) struct ChunkStruct { uint32_t width; uint32_t height; uint8_t bit_depth; uint8_t color_type; uint8_t compression; uint8_t filter; uint8_t interlace; }; #pragma pack() STATIC_ASSERT(expected_13bytes, sizeof(struct ChunkStruct) == 13); I have tried unsuccesfully using #pragma pack(push, 1) /* struct ChunkStruct { ...

Best Compiler Destination

与世无争的帅哥 提交于 2019-12-17 17:58:08
问题 I've got a few languages I've been building as interpreters. When I'm ready to take "that next step", what options are best for non-native compiled formats... what are the pros and cons of each? I've been looking at compiling to CLR or LLVM, and contemplated C-midcompile a few times, but I'm not completely certain. A few features I'm hoping to be able to port are as follows: REPL - One of the languages I'm building supports block-level evaluation during runtime. Robust Macros - One of the

LLVM vs. GCC for iOS development [closed]

无人久伴 提交于 2019-12-17 17:36:45
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . In latest iOS SDK, Apple provides three compiler options: GCC, LLVM with Clang and LLVM-GCC. I understand more or less what these 3

ARM服务器编译安装ClickHouse

蓝咒 提交于 2019-12-17 17:13:51
目录 一、编译安装ClickHouse背景 二、编译安装ClickHouse方法 三、编译安装ClickHouse环境 四、编译安装ClickHouse步骤 1,安装依赖项 2,编译安装cmake 3.,编译安装GCC编译器 4,编译安装clang编译器 AArch64架构需要使用Clang编译器,X86架构可直接使用GCC编译器,不必做这步 5,编译安装ClickHouse 6,测试验证ClickHouse 7,编译过程遇到的问题 一、编译安装ClickHouse背景 因公司需要在华为泰山服务器验证开源软件安装及功能测试,AARCH64 (ARM64) 架构服务器,不支持SSE 4.2 指令集,在以前是试验性支持的,刚好ClickHouse release v19.17.4.11, 2019-11-22 新版本已经正式支持ARM64服务器,目前没有预编译好的版本,需要进行编译安装。 二、编译安装ClickHouse方法 * 先介绍下X86架构ClickHouse编译,我们常用的电脑都是X86处理器,不必搭建交叉编译环境,直接在本地虚拟机,并且可使用GCC编译ClickHouse。 * 编译方法1:为AArch64 CPU进行构建ClickHouse,可搭建aarch64交叉编译环境:在x86架构服务器,构建出能在AARCH64 CPU 体系架构的Linux上运行的二进制程序

#error “Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h”

╄→гoц情女王★ 提交于 2019-12-17 16:34:12
问题 I have been trying to follow the tutorial at http://gnuu.org/2009/09/18/writing-your-own-toy-compiler/5/ (using flex, bison and llvm) but when typing the line g++ -o parser parser.cpp tokens.cpp main.cpp I get the following errors: In file included from /usr/local/include/llvm/Support/PointerLikeTypeTraits.h:18:0, from /usr/local/include/llvm/ADT/PointerIntPair.h:17, from /usr/local/include/llvm/IR/Use.h:28, from /usr/local/include/llvm/IR/Value.h:17, from node.h:3, from parser.y:2: /usr

Confusing Template error

青春壹個敷衍的年華 提交于 2019-12-17 15:23:34
问题 I've been playing with clang a while, and I stumbled upon "test/SemaTemplate/dependent-template-recover.cpp" (in the clang distribution) which is supposed to provide hints to recover from a template error. The whole thing can be easily stripped down to a minimal example: template<typename T, typename U, int N> struct X { void f(T* t) { // expected-error{{use 'template' keyword to treat 'f0' as a dependent template name}} t->f0<U>(); } }; The error message yielded by clang: tpl.cpp:6:13: error

Unoptimized clang++ code generates unneeded “movl $0, -4(%rbp)” in a trivial main()

拟墨画扇 提交于 2019-12-17 14:56:50
问题 I created a minimal C++ program: int main() { return 1234; } and compiled it with clang++5.0 with optimization disabled (the default -O0 ). The resulting assembly code is: pushq %rbp movq %rsp, %rbp movl $1234, %eax # imm = 0x4D2 movl $0, -4(%rbp) popq %rbp retq I understand most of the lines, but I do not understand the "movl $0, -4(%rbp)". It seems the program initializes some local variable to 0. Why? What compiler-internal detail leads to this store that doesn't correspond to anything in

Clang(LLVM) compile with frameworks

假如想象 提交于 2019-12-17 13:26:52
问题 I am using: clang -ObjC -framework UIKit -o /var/compiled/c /Documents/Source/main.m In OS X terminal. I also tried UIKit.framework, but I am getting Fatal Error: 'UIKit/UIKit.h' not found with both. Any suggestions? Thanks 回答1: Compiling for iOS without using Xcode is not easy. In your case, you're trying to use an iOS framework but you're using neither the iOS toolchain's compiler nor the iOS SDK. If you look at the compile transcript for an Xcode project you'll see some of the flags that

How to use my own Android.mk file with Android Studio

て烟熏妆下的殇ゞ 提交于 2019-12-17 06:09:32
问题 I am defining some variables within the Android.mk file (I am passing some flags for the compiler), but every time I build my project, the Android.mk is overwritten. I am assuming that Gradle is responsible and that I should be looking there? How do I use my own Android.mk file? Background Info: Ubuntu 64bit, Android Studio 1.0.1, JDK7. I have wrapped my NDK version with O-LLVM NDK, and as such am editing the Android.mk file located at app/build/intermediates/ndk/debug (it's the only Android