search for: targettripl

Displaying 20 results from an estimated 52 matches for "targettripl".

Did you mean: targettriple
2018 Jan 20
1
No Targets in TargetRegistry
This is from https://stackoverflow.com/questions/48360685/no-targets-in-targetregistry I have the following code, which should get the default llvm::Target. auto const targetTriple = llvm::sys::getDefaultTargetTriple(); llvm_module.setTargetTriple(targetTriple); std::string error; auto const * target = llvm::TargetRegistry::lookupTarget(targetTriple, error); if (target == nullptr) { auto targets = llvm::TargetRegistry::targets(); size_t target...
2013 Aug 22
0
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt (Clang patch)
...EQ : Joined<["-"], "mabi=">, Group<m_Group>; def march_EQ : Joined<["-"], "march=">, Group<m_Group>; --- ./tools/clang/lib/Driver/Driver.cpp.orig +++ ./tools/clang/lib/Driver/Driver.cpp @@ -1700,6 +1700,9 @@ static llvm::Triple computeTargetTriple(StringRef DefaultTargetTriple, if (Target.getArch() == llvm::Triple::ppc) Target.setArch(llvm::Triple::ppc64); } + } else if (Args.getLastArg(options::OPT_mx32)) { + if (Target.getArch() == llvm::Triple::x86_64) + Target.setEnvironment(llvm::Triple::GNUX32); }...
2013 Aug 22
7
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
Hi, I'm working on bringing up complete coverage for a Gentoo x32 "desktop" system. I've been cooking up quite a few patches for various packages to push upstream, but right now, the biggest blocker is the lack of support for building with/codegen targeting x32 in llvm/clang. Since the x32 patches were sent last year, I see support code has landed in LLVM, and basic handling of
2013 Aug 22
3
[LLVMdev] [NEW PATCH] X32 ABI support for Clang/compiler-rt (Clang patch)
...+121,7 @@ SmallVectorImpl<StringRef> &BiarchLibDirs, SmallVectorImpl<StringRef> &BiarchTripleAliases); - void ScanLibDirForGCCTriple(llvm::Triple::ArchType TargetArch, + void ScanLibDirForGCCTriple(llvm::Triple TargetTriple, const llvm::opt::ArgList &Args, const std::string &LibDir, StringRef CandidateTriple, --- ./tools/clang/lib/Driver/Tools.cpp.orig 2013-08-18 13:35:35.783789840 +0000 +++ ./tools/clang/lib/Dr...
2015 Sep 24
2
TargetTriple issue: LC_VERSION_MIN_MACOSX: Darwin kernel version vs SDK version
...gi?id=24927 Using the Xcode 7 linker, one gets messages such as the following when linking objects generated using llvm: ld: warning: object file (foo.o) was built for newer OS X version (14.5) than being linked (10.9) The issue is the following: a) In lib/Support/Unix/Host.inc, sys::getDefaultTargetTriple() sets the OS name to darwin14.5 when running on MaxOS X 10.10. 14.5 is the Darwin kernel version as reported by uname. b) In lib/CodeGen/AsmPrinter.cpp, AsmPrinter::doInitialization() writes out this version number to the LC_VERSION_MIN_MACOSX of the generated object. c) The XCode 7 linker seem...
2015 Sep 17
6
The Trouble with Triples
...R somehow. Hopefully, we are agreed so far. Let's assume for the rest of this explanation that Phases 1-6 are complete and we now have const TargetTuple throughout the API. I'd like to draw particular attention to TargetMachine which, like everything else, has had its Triple member (called TargetTriple) replaced with a TargetTuple member (named TheTargetTuple). This member is used in all the same ways it used to be used when it was a Triple (named TargetTriple). At this point, in the MC layer we have a number of classes that need to know the ABI but lack this information. Our TargetMachine has...
2011 May 31
0
[LLVMdev] Assertion failure in MC emitter running LLVM libs on Android using android-ndk
...at is so strange about this error is that if I instead output the ARM assembly language then assembly it on the build host using the Android NDK toolchain, it assembles without any problem at all. The library usage to generate the assembly is: std::string errorStr; std::string targetTriple = llvm::sys::getHostTriple(); const llvm::Target *target = llvm::TargetRegistry::lookupTarget( targetTriple, errorStr ); llvm::TargetMachine *targetMachine = target->createTargetMachine( targetTriple, "" ); targetMachine->setAsmVerbosityDefault( true );...
2012 Mar 02
2
[LLVMdev] "-march" trashing ARM triple
...ux". As a result, the target features will be set generically. (Note that using "-march armv7" is not valid.) This is clearly wrong, but I'm not clear on where/how this should be fixed. Does the -march substitution need to happen at all? Could it be disabled only for ARM? Should TargetTriple or -march be made more precise? Thanks, - pdox -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120302/ca064760/attachment.html>
2014 Jun 19
2
[LLVMdev] [PATCH] triples for baremetal
.../Target/ARM/ARMSubtarget.cpp =================================================================== --- lib/Target/ARM/ARMSubtarget.cpp (revision 211122) +++ lib/Target/ARM/ARMSubtarget.cpp (working copy) @@ -264,7 +264,7 @@ default: if ((isTargetIOS() && isMClass()) || (TargetTriple.isOSBinFormatMachO() && - TargetTriple.getOS() == Triple::UnknownOS)) + TargetTriple.getOS() == Triple::NoneOS)) TargetABI = ARM_ABI_AAPCS; else TargetABI = ARM_ABI_APCS; Index: unittests/ADT/TripleTest.cpp ======================================...
2019 Jan 24
2
LLVM Kaleidoscope : Compiling to Object Code - Segmentation Fault
...tional_detail::OptionalStorage<llvm::Reloc::Model, true>::OptionalStorage(llvm::optional_detail::OptionalStorage<llvm::Reloc::Model, true> const&) ()| |Source code: | TargetOptions opt; autoRM =Optional<Reloc::Model>(); autoTheTargetMachine = Target->createTargetMachine(TargetTriple, CPU, Features, opt, RM); Whether this behavior is already notified and is there any workaround available for it ? I would be great to know the root cause for this behavior. Of course, the kaleidoscope is friendly and good introduction to llvm for beginners, thank you very much for developing...
2015 Sep 22
2
The Trouble with Triples
...but currently crashes. * i386-linux-gnu means i486 on Debian Etch and i586 on more recent Debians Renato had a number of similar ARM examples too. >> What can't be done to TargetMachine to avoid this serialization? >> TargetMachine already has the serialization (see TargetMachine::TargetTriple). >> We're not doing anything new here. We're simply replacing one object holding >> faulty information with a new object holding reliable information. > This is side stepping my question and making it about Triple. I've specifically > said that TargetMachine does not...
2012 Mar 02
0
[LLVMdev] "-march" trashing ARM triple
...As a result, the target features will be set generically. (Note that using "-march armv7" is not valid.) > > This is clearly wrong, but I'm not clear on where/how this should be fixed. Does the -march substitution need to happen at all? Could it be disabled only for ARM? Should TargetTriple or -march be made more precise? > When using a triple, -march doesn't add any additional information. The idea is that -march is a shorthand for a generic triple (e.g., -march=arm implies -mtriple=arm-unknown-unknown or something similar). It seems to me that using both on the llc comman...
2010 May 02
2
[LLVMdev] Win32 COFF Support
...athan > I'll let others comment on MC hooks, I just made a very brief look > over the contents of the archive. You can find the comments below. > Yes I looked at this and there are several ways but TargetAsmBackend looked the bast place to deal with the MCStreamer choice for different TargetTriples. > for (SmallVector<char, Len>::const_iterator i = > Data.begin (); i != Data.end (); i++) > > { > > if (i != Data.begin ()) > > dbgout (' ');...
2014 Jun 17
4
[LLVMdev] triples for baremetal
[+llvmdev, -llvm-dev] (Oopsies, llvmdev doesn't have a hyphen in it like all the others do) On 6/17/14, 10:45 AM, Jonathan Roelofs wrote: > [+llvm-dev, cfe-dev] > > Was "Re: [PATCH] ARM: allow inline atomics on Cortex M" > > On 6/17/14, 10:42 AM, Jonathan Roelofs wrote: >> >> >> On 6/17/14, 9:35 AM, Renato Golin wrote: >>> On 17 June 2014
2019 Jan 24
2
LLVM Kaleidoscope : Compiling to Object Code - Segmentation Fault
...t;::OptionalStorage(llvm::optional_detail::OptionalStorage<llvm::Reloc::Model, > true> const&) ()| > > |Source code: | > > TargetOptions opt; > autoRM =Optional<Reloc::Model>(); > autoTheTargetMachine = > Target->createTargetMachine(TargetTriple, CPU, Features, opt, RM); > > Whether this behavior is already notified and is there any > workaround available for it ? I would be great to know the root > cause for this behavior. > > Of course, the kaleidoscope is friendly and good introduction to > llvm...
2010 May 02
2
[LLVMdev] Win32 COFF Support
...the MachOWriter, this is designed to be extendable to other writers. The MCStreamer stuff just needs the same doing probably in TargetAsmBackend. It would be good to have this as a separate patch. This will allow both COFFWriter and ELFWriter as well as the MachOWriter to coexist and be selected by TargetTriple. BTW could you have your Writer and Streamer in different source code files, and follow the MachO code format as far as is possible/reasonable. JTFYI The COFF code I have written consists of Reader and Writer of COFF internal object modules to/from COFF format. I am looking at producing a linker...
2015 Sep 16
3
The Trouble with Triples
On 16 September 2015 at 21:56, Jim Grosbach <grosbach at apple.com> wrote: > Why do we care about GAS? We have an assembler. It's not that simple. There are a lot of old code out there, including the Linux kernel which we do care a lot, that only compiles with GAS. We're slowly moving the legacy code up to modern standards, and specifically some kernel folks are happy to move up
2013 Oct 23
0
[LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?
This is the right fix if Cygwin wants calls to __chkstk. Otherwise you'll want TargetTriple.isOSMSVCRT(). On Wed, Oct 23, 2013 at 2:50 AM, Yaron Keren <yaron.keren at gmail.com> wrote: > If it's a Windows-only thing the correct tests would be: > > if (NumBytes >= 4096 && STI.isOSWindows()) { > > and > > if (Subtarget->isTargetWindows())...
2015 Sep 23
4
The Trouble with Triples
...to see the examples you think show that things are impossible to deal with in the current architecture. --- To reply more directly to your email: Thanks :) > What can't be done to TargetMachine to avoid this serialization? TargetMachine already has the serialization (see TargetMachine::TargetTriple). We're not doing anything new here. We're simply replacing one object holding faulty information with a new object holding reliable information. This is side stepping my question and making it about Triple. I've specifically said that TargetMachine does not and is not completely dep...
2010 Apr 17
0
[LLVMdev] Intro to the MC Project
...his is currently the solution I use. What do you think ? Do you see another possibilities ? - Currently I'm using the LLVMTargetMachine::addPassesToEmitFile with FileType set to CGFT_ObjectFile, and with the triple environment name hack, I am able to create the correct streamer : if (Triple(TargetTriple).getEnvironmentName().equals("JIT")) { AsmStreamer.reset(createJITStreamer(*Context, *TAB, Out, MCE)); } else { AsmStreamer.reset(createMachOStreamer(*Context, *TAB, Out, MCE)); } What do you think ? Do you consider this to be acceptable ? Or just horrible ? - MCObj...