J S via llvm-dev
2019-Mar-23 20:04 UTC
[llvm-dev] Generating object files more efficiently
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. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190323/da9b3c18/attachment.html>
Doerfert, Johannes via llvm-dev
2019-Mar-23 20:15 UTC
[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-- Johannes Doerfert Researcher Argonne National Laboratory Lemont, IL 60439, USA jdoerfert at anl.gov -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190323/bd0a49e3/attachment.sig>
J S via llvm-dev
2019-Mar-23 20:26 UTC
[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-devllvm-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/cbd1cfdf/attachment.html>