Comments (6)
The issue seems a bit wider: any option starting with "-l".
Presumably this is to strip link options, but it prevents to use "-mllvm -loop-something" options such as these:
https://github.com/llvm/llvm-project/blob/f4c0c40f388fff0975ecada4997683cef3cb1fae/llvm/lib/Transforms/Scalar/LoopFlatten.cpp#L85-L103
Also when using LLVM tools inside Godbolt directly (for example, switch language to "LLVM IR" and select a version of the "opt" tool) any option starting with "-l" is removed. Here, you should be able to specify the LLVM options directly, without "-mllvm" prefix, so directly "-loop-something". This does not work.
from compiler-explorer.
At least for GCC and clang, -l
gets passed to the linker as a library to link against. I can run this on my local clang:
% clang -loop-some-invalid-option -c /tmp/moo.cc
clang: warning: -loop-some-invalid-option: 'linker' input unused [-Wunused-command-line-argument]
%
no error, that's just a warning. We don't strip anything but hand all the arguments (plus a few more) to the compiler itself. In the default mode we don't link so the -l
option is not processed by anything. If you enable the linker: https://godbolt.org/z/xjzETcr8G you get the error you'd expect.
from compiler-explorer.
I agree the -l
option does seem to somehow get droppedf by the opt
tool though,. so we still have something to investigate! :)
from compiler-explorer.
mayyybe we do filter -l
stuff? argh :) we will loko. thanks again for this
from compiler-explorer.
Thanks, Matt. I should have reported my problem more directly: I cannot use LLVM command-line arguments starting with -loop
, or even starting with -l
. They are either ignored, or they trigger an error.
This is with clang:
https://godbolt.org/z/r15bGsjnr
This is with opt:
https://godbolt.org/z/8YdWPP3e6
from compiler-explorer.
probable culprit: #6297
from compiler-explorer.
Related Issues (20)
- ppc64 and ppc64le nightly cross gcc failures HOT 1
- [REQUEST]: Permit "Add Executor" to Conformance View
- [BUG]: Xtensa ESP32 LEND loop targets are filtered as directives HOT 4
- [COMPILER REQUEST]: GraalVM Native Image
- [BUG]: code compiles to either infinite loop or nothing with -O3 HOT 3
- [COMPILER REQUEST]: QuickJS
- TypeError: opcodes is not iterable
- Can't link with gcc 4.7.1 and 4.7.2 HOT 1
- [BUG]: recompiling resets scroll position to the top
- [LIB REQUEST] pycryptodome & cryptography
- [COMPILER REQUEST]: sh-elf-gdc HOT 4
- [BUG]: Mobile mode can't be edited? HOT 1
- [BUG]: Browser tab refresh resets all renamed CE tabs
- [COMPILER REQUEST]: Groovy HOT 1
- [BUG]: char8_t not declared even with -std=c23 HOT 1
- Make lines linkable HOT 3
- [BUG]: preprocessor output is empty when using MS compiler
- [BUG]: permission denied opening /dev/null HOT 5
- [BUG]: Mfem library not loading: single vs double precision not specified
- [BUG]: Internal Compiler Explorer error: Error: Unexpected basic block terminator: HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compiler-explorer.