compilation

LLVM and compiler nomenclature

China☆狼群 提交于 2019-12-21 03:47:27
问题 I am looking into the LLVM system and I have read through the Getting Started documentation. However, some of the nomenclature (and the wording in the clang example) is still a little confusing. The following terms and commands are all part of the compilation process, and I was wondering if someone might be able to explain them a little better for me: clang -S vs. clang -c (I know what -c does, but how do the results differ?) * (Edit) LLVM Bitcode vs. LLVM IR (what is the difference?) .ll

why do we need the shared library during compile time

拈花ヽ惹草 提交于 2019-12-21 03:47:16
问题 Why we need the presence of the shared library during the compile time of my executable? My reasoning is that since shared library is not included into my executable and is loaded during the runtime, it is not supposed to be needed during compile time. Or Am I missing something? #include<stdio.h> int addNumbers(int, int); //prototype should be enough, no? int main(int argc, char* argv[]){ int sum = addNumbers(1,2); printf("sum is %d\n", sum); return 0; } I had the libfoo.so in my current dir

Eclipse won't compile/run java file

梦想与她 提交于 2019-12-21 03:34:33
问题 I am just trying to compile and run a simple java program. When I go to run my tester class it says select what to run and it gives me Ant Build which when highlighted says "Launches an Ant build with default settings" or Ant Build... that says "Launches an Ant build and allows it to be configured". When I try to select either of these it prompts Build failed. Reason: Unable to find ant file to run. I honestly don't know what these ant builds and files are. This is definitely a dumb question

Golang - Difference between “go run main.go” and compilation

 ̄綄美尐妖づ 提交于 2019-12-21 03:29:29
问题 After writing some scripts in Go I asked myself if there is any difference between the compilation of a .go -file and the later execution and the go run FILE.go command in terms of performence etc. Are there any advantages if I start a webservice with one of these methods? 回答1: go run is just a shortcut for compiling then running in a single step. While it is useful for development you should generally build it and run the binary directly when using it in production. 回答2: 'go install' command

How to recompile with -Xlint:unchecked in Ant build task?

两盒软妹~` 提交于 2019-12-21 03:22:11
问题 When I run the "compile" target of my Ant "build.xml" file, then I get the following message: Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. My compile target is the following: <target name="compile"> <javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" debuglevel="lines,source" includeantruntime="false"> <classpath refid="class.path" /> </javac> <javac srcdir="${test.dir}" destdir="${classes.dir}" debug="true"

How can I get the LLVM IR dump from XLA in TensorFlow?

这一生的挚爱 提交于 2019-12-21 02:48:09
问题 I am trying to get the LLVM IR generated by the XLA Compiler in TensorFlow. I know that the entire LLVM Context is contained in the llvm_module object. This is then converted to a string with the utility function llvm_ir::DumpModuleToString(*llvm_module) function in the Compile() function in the file: //tensorflow/compiler/xla/service/cpu.cpu_compiler.cc . But I have been trying to log it using VLOG(2) from tensorflow/core/logging.h . No logs are shown. However, the remaining VLOG(2)

How do I compile an existing C program for Android using NDK?

和自甴很熟 提交于 2019-12-21 02:42:47
问题 I am writing an Android app to test network performance, and I want to use iPerf in the app. I can find binary iPerf files already compiled for Android (and then I can run iPerf on the phone and collect its output) but I'm interested in compiling the files myself. Here, someone presents scripts that can be used to compile the program: http://sourceforge.net/tracker/index.php?func=detail&aid=3533374&group_id=128336&atid=711373 I know that it requires the NDK but I don't know where to start.

How to conditionally compile version-specific Swift (1.2 vs 2.0) code in the same source file?

青春壹個敷衍的年華 提交于 2019-12-21 02:30:12
问题 I have a Swift demo project that comes bundled with my framework. I want to ensure that the Swift code in the demo compiles successfully with both Xcode 6 (Swift 1.2) and Xcode 7 (Swift 2.0) without user intervention . Since there's only marginal preprocessor support in Swift, how can I determine at compile-time which version of Swift or Xcode is being used to compile the code? Now, here's the important detail: It has to work automatically! Open the project in Xcode 6 -> compiles the Swift 1

Python 3.1.1 with --enable-shared : will not build any extensions

∥☆過路亽.° 提交于 2019-12-20 23:31:07
问题 Summary: Building Python 3.1 on RHEL 5.3 64 bit with --enable-shared fails to compile all extensions. Building "normal" works fine without any problems. Please note that this question may seem to blur the line between programming and system administration. However, I believe that because it has to deal directly with getting language support in place, and it very much has to do with supporting the process of programming, that I would cross-post it here. Also at: https://serverfault.com

iOS Compiling (armv7, i386) of several libs. Configure Script: C preprocessor fails sanity check

人盡茶涼 提交于 2019-12-20 23:22:43
问题 I've been doing a lot of cross-compiling of different libraries for iOS and until iOS5 there was no problem. Ok, apparently my problem is, that the iOS5 SDK does not include the GNU gcc compiler any more. Only llvm and clang are available. My problem is, that I cannot finish to run the 'configure' script of any library any more. It always fails with: configure: error: C preprocessor "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc" fails sanity check gcc only is a symbolic link