llvm-gcc

i have an error when executing “from lxml import etree” in the python command line after successfully installed lxml by pip

て烟熏妆下的殇ゞ 提交于 2019-12-05 21:39:09
bash-3.2$ pip install lxml-2.3.5.tgz Unpacking ./lxml-2.3.5.tgz Running setup.py egg_info for package from file:///Users/apple/workspace/pythonhome/misc/lxml-2.3.5.tgz Building lxml version 2.3.5. Building with Cython 0.17. Using build configuration of libxslt 1.1.27 Building against libxml2/libxslt in the following directory: /usr/local/lib warning: no previously-included files found matching '*.py' Installing collected packages: lxml Running setup.py install for lxml Building lxml version 2.3.5. Building with Cython 0.17. Using build configuration of libxslt 1.1.27 Building against libxml2

__block attribute on property declarations

微笑、不失礼 提交于 2019-12-05 02:49:39
问题 I have to fix some existing code that builds just fine with LLVM (on iOS) so that it builds with llvm-gcc-4.2 too. I'm done with pretty much everything, except this pattern which is found at a few places: @property (nonatomic, retain) __block id myProperty; I suspect the intent here is to allow access to the property from inside a block without retaining self . How can I remove the __block attribute, which gcc doesn't support here, but still achieve the same effect? 回答1: I'll suggest you've

Xcode 4.2 Code Coverage

廉价感情. 提交于 2019-12-04 04:25:47
I started to use Xcode 4.2 and i have problems with generating code coverage. Xcode 4.2 does not include the GCC 4.2 compiler, but it was replaced with the LLVM GCC 4.2 compiler. The first one was needed to generate code coverage in the previous version of Xcode. I followed the 'tutorial' on CoverStory website , but this results in the following: a) when i do all steps, no coverage files. b) when i link the libprofile_rt.dylib to my project, the test which should fail, do not fail anymore. Did anyone encounter this issue? And how did you solve it? Thanks Here is a way to enable compiling with

__block attribute on property declarations

只谈情不闲聊 提交于 2019-12-03 20:40:16
I have to fix some existing code that builds just fine with LLVM (on iOS) so that it builds with llvm-gcc-4.2 too. I'm done with pretty much everything, except this pattern which is found at a few places: @property (nonatomic, retain) __block id myProperty; I suspect the intent here is to allow access to the property from inside a block without retaining self . How can I remove the __block attribute, which gcc doesn't support here, but still achieve the same effect? I'll suggest you've found a compiler bug, the declaration: @property (nonatomic, retain) __block id myProperty; is meaningless.

Build 32-bit with 64-bit llvm-gcc

强颜欢笑 提交于 2019-12-03 16:10:45
问题 I have a 64-bit version of llvm-gcc, but I want to be able to build both 32-bit and 64-bit binaries. Is there a flag for this? I tried passing -m32 (which works on the regular gcc), but I get an error message like this: [jay@andesite]$ llvm-gcc -m32 test.c -o test Warning: Generation of 64-bit code for a 32-bit processor requested. Warning: 64-bit processors all have at least SSE2. /tmp/cchzYo9t.s: Assembler messages: /tmp/cchzYo9t.s:8: Error: bad register name `%rbp' /tmp/cchzYo9t.s:9: Error

Build 32-bit with 64-bit llvm-gcc

好久不见. 提交于 2019-12-03 06:19:45
I have a 64-bit version of llvm-gcc, but I want to be able to build both 32-bit and 64-bit binaries. Is there a flag for this? I tried passing -m32 (which works on the regular gcc), but I get an error message like this: [jay@andesite]$ llvm-gcc -m32 test.c -o test Warning: Generation of 64-bit code for a 32-bit processor requested. Warning: 64-bit processors all have at least SSE2. /tmp/cchzYo9t.s: Assembler messages: /tmp/cchzYo9t.s:8: Error: bad register name `%rbp' /tmp/cchzYo9t.s:9: Error: bad register name `%rsp' ... This is backwards; I want to generate 32-bit code for a 64-bit processor

Changing to llvm compiler when deploying iPhone app

ε祈祈猫儿з 提交于 2019-12-02 10:22:11
I found this: Changing Compiler to llvm-clang on existing iPhone Project But that does not help. I am still getting the error. Setting the BaseSDK to the iPhoneSimulator 3.1 seems to work. But I don't think this is the right thing to do... If you read the answer and comments on that question, you'll see that there is not yet a version of LLVM that will target the iPhone device. You can target the iPhone Simulator using LLVM GCC, with some fiddling, because that is running on a Mac. Even though LLVM can target the ARM platform, Apple has indicated that it's not yet ready for use in deploying to

What is required to generate code coverage data using XCode 4

江枫思渺然 提交于 2019-12-01 19:07:58
I have been trying to generate code coverage data for my application on XCode 4.2.1 (build 4D502) using the steps outlined at http://code.google.com/p/coverstory/wiki/UsingCoverstory I am obviously missing something as there are no .gcno or .gcda files being generated along side my object files. I've tried adding the settings to both my test target and my application target but to no avail. I've had a second set of eyes go over things and all appears to be in order. Any ideas as to what is missing. Thanks in advance. It doesn't work with llvm-gcc; you'll need to use the "LLVM Compiler 3.0"

Why retain count is diffrent in debug mode and in running mode?

女生的网名这么多〃 提交于 2019-12-01 10:47:12
问题 I know that how ARC and MRC works. but I am confuse while testing the below code. I don't know why this happen. Why the retain count is different in debug mode and in running mode for the same question? NSMutableArray *a = [NSMutableArray array]; [a addObject:@"abc"]; NSLog(@" 1 Retain count is %ld", CFGetRetainCount((__bridge CFTypeRef)a)); __weak NSMutableArray *b = a; NSLog(@" 2 Retain count is %ld", CFGetRetainCount((__bridge CFTypeRef)a)); a = nil; NSLog(@" 3 Retain count is %ld",

No code coverage with Mac OS X Lion and XCode 4 / llvm-g++-4.2

别等时光非礼了梦想. 提交于 2019-11-29 14:32:27
Other people have reported not being able to generate code coverage with XCode 4 , but I find not only can I not do it from within XCode 4, I can't do it even with a simple toy program from the command line. I followed the examples given here and here , which led me to create this cov.c file: #include <stdio.h> int main (void) { int i; for (i = 1; i < 10; i++) { if (i % 3 == 0) printf("%d is divisible by 3\n", i); if (i % 11 == 0) printf("%d is divisible by 11\n", i); } return 0; } I then used the following commands in an attempt to generate code coverage: g++ -c -g -O0 --coverage -o $PWD/obj