[llvm-dev] Generating object files more efficiently
Doerfert, Johannes via llvm-dev
llvm-dev at lists.llvm.org
Sat Mar 23 13:39:58 PDT 2019
Oh, my bad.
Idk why llc seems to know that architecture but clang does not.
Doesn't make sense to me, sorry.
________________________________
From: J S <mm92126 at hotmail.com>
Sent: Saturday, March 23, 2019 3:32:03 PM
To: Doerfert, Johannes
Cc: via llvm-dev
Subject: Re: [llvm-dev] Generating object files more efficiently
It is my actual target architecture
________________________________
From: Doerfert, Johannes <jdoerfert at anl.gov>
Sent: Saturday, March 23, 2019 1:30 PM
To: J S
Cc: via llvm-dev
Subject: Re: [llvm-dev] Generating object files more efficiently
I copied "-march=XYZ" from your original email,
you have to replace it with your actual target architecture or simply drop it.
________________________________
From: J S <mm92126 at hotmail.com>
Sent: Saturday, March 23, 2019 3:26:59 PM
To: Doerfert, Johannes
Cc: via llvm-dev
Subject: Re: [llvm-dev] Generating object files more efficiently
Johannes,
I tried the last one and it gave me this:
error: unknown target CPU 'XYZ'
note: valid target CPU values are: nocona, core2, penryn, bonnell, atom,
silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7,
westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell,
core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake,
cannonlake, icelake-client, icelake-server, knl, knm, k8, athlon64,
athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10,
barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2,
x86-64
________________________________
From: Doerfert, Johannes <jdoerfert at anl.gov>
Sent: Saturday, March 23, 2019 1:15 PM
To: J S
Cc: via llvm-dev
Subject: Re: [llvm-dev] Generating object files more efficiently
I would have guessed:
object:
clang -c foo.c -o foo.o -march=XYZ
shared library:
clang -shared foo.c -o foo.so -march=XYZ
executable:
clang foo.c -o foo -march=XYZ
On 03/23, J S via llvm-dev wrote:
> Currently I compile my C code in 2 steps in order to generate .o files
>
> clang -emit-llvm -c foo.c -o foo.bc
> llc -march=XYZ foo.bc -filetype=obj
>
> Is there a way to generate either .o or .elf files in just 1 command?
>
> Thanks.
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
llvm-dev Info Page<https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>
lists.llvm.org
To see the collection of prior postings to the list, visit the llvm-dev Archives.. Using llvm-dev: To post a message to all the list members, send email to llvm-dev at lists.llvm.org. You can subscribe to the list, or change your existing subscription, in the sections below.
--
Johannes Doerfert
Researcher
Argonne National Laboratory
Lemont, IL 60439, USA
jdoerfert at anl.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190323/88727113/attachment.html>
More information about the llvm-dev
mailing list