On 15/11/12 10:15, Philip Ashmore wrote:> On 15/11/12 08:58, Duncan Sands wrote: >>> Is there a way to get the target triple of the machine the code is running on, >>> or barring that, the machine llvm was built on? >> >> clang -v >> >> Ciao, Duncan. >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > Sorry for not being specific enough - I meant in code. > I tried some clang functions to try to get the triplet using clang functions but > it still caused the error.I suggest you take a look in include/llvm/Support/Host.h Ciao, Duncan.
On 15/11/12 10:10, Duncan Sands wrote:> On 15/11/12 10:15, Philip Ashmore wrote: >> On 15/11/12 08:58, Duncan Sands wrote: >>>> Is there a way to get the target triple of the machine the code is >>>> running on, >>>> or barring that, the machine llvm was built on? >>> >>> clang -v >>> >>> Ciao, Duncan. >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> Sorry for not being specific enough - I meant in code. >> I tried some clang functions to try to get the triplet using clang >> functions but >> it still caused the error. > > I suggest you take a look in include/llvm/Support/Host.h >I know about getDefaultTargetTriple(). What I don't know is how to get this information into the llvm::Module so that it gets output with an llvm::raw_os_ostream in a way that clang understands. If I could use it with llvm-as without it having to make assumptions, to build shared libraries and programs, that would be great too.> Ciao, Duncan. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdevRegards, Philip
On 15/11/12 23:44, Philip Ashmore wrote:> On 15/11/12 10:10, Duncan Sands wrote: >> On 15/11/12 10:15, Philip Ashmore wrote: >>> On 15/11/12 08:58, Duncan Sands wrote: >>>>> Is there a way to get the target triple of the machine the code is >>>>> running on, >>>>> or barring that, the machine llvm was built on? >>>> >>>> clang -v >>>> >>>> Ciao, Duncan. >>>> _______________________________________________ >>>> LLVM Developers mailing list >>>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>> >>> Sorry for not being specific enough - I meant in code. >>> I tried some clang functions to try to get the triplet using clang >>> functions but >>> it still caused the error. >> >> I suggest you take a look in include/llvm/Support/Host.h >> > > I know about getDefaultTargetTriple(). > > What I don't know is how to get this information into the llvm::Module > so that it gets output with an llvm::raw_os_ostream in a way that > clang understands. > > If I could use it with llvm-as without it having to make assumptions, > to build shared libraries and programs, that would be great too. >Maybe this is related to why llvm::InitializeNativeTarget() fails. All of this is in my v3c-storyboard project, sb/tests/hello-world3-test.cpp. I even tried outputting the target triple information myself to the header of the .ll file. No luck.>> Ciao, Duncan. >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > Regards, > Philip > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Possibly Parallel Threads
- [LLVMdev] unable to interface with target machine
- [LLVMdev] [cfe-dev] RFC: A Great Renaming of Things (or: Let's Repaint ALL the Bikesheds!)
- [LLVMdev] unable to interface with target machine
- [LLVMdev] [cfe-dev] RFC: A Great Renaming of Things (or: Let's Repaint ALL the Bikesheds!)
- [LLVMdev] unable to interface with target machine