Questions tagged [compiler-options]

Compiler-options are parameters that are being passed to the compiler and that affect the compilation process or its resulting product.

Modern compilers have a large set of options that can be used to somehow change the way the code is compiled. Usually those options are passed as command-line flags.

Example for Java:

javac -target 1.5 -bootclasspath jdk1.5.0\lib\rt.jar \ -extdirs "" OldCode.java

More information about particular options can be found on compiler vendor's websites, to name a few:

244 questions
3
votes
1 answer

Haskell program get compiler args programmatically?

Is it possible to get the compiler args programmatically in Haskell? I am writing a stack trace formatting library and I would find it very useful to know if "-prof" and "-fprof-auto" were used when compiling.
Michael Lafayette
  • 2,972
  • 3
  • 20
  • 54
3
votes
3 answers

What's an example of incorrect use of the ARM C Compiler Option "Enum container always int"?

In http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0065d/Cihejcda.html there is an option and a note: Enum container always int Select this option to force all enumerations to be stored in integers. By default, the compiler uses the…
memic
  • 73
  • 8
3
votes
1 answer

How to force compiler to set a non-zero value to uninitialized variables?

I am playing with C++ value initialization. Therefore, I am printing uninitialized values in order to highlight (un)initialization depending on C++ standard version. But uninitialized values convey often the zero value :-( How to highlight if a…
oHo
  • 51,447
  • 27
  • 165
  • 200
3
votes
1 answer

Visual C++ Compiler Flag for Visual Studio 2013 for Targeting XP

I want to create a C++ program with Visual Studio 2013 targeted for the XP environment, I am aware of the UI option in Project Properties -> Configuration tab to set the the Platform Tool set top Windows v120_xp, I want to acheive that using the…
3
votes
2 answers

How do I create a WT project in MSVC?

If anyone has used WT successfully with MSVC (mine is 2005), could you please provide some details on how this can be done? I have installed WT fine , then ran some examples. The problems begin when I try to create a project of my own, as simple as…
Wartin
  • 1,965
  • 5
  • 25
  • 40
3
votes
1 answer

Temporary file with the contents of all the included headers

I need to track an error related with the inclusion of header files, I'm suspecting that one or more files have unmatched curly brackets and/or parentheses and I think that would be useful to take a look to the file that pre-processor brings to the…
PaperBirdMaster
  • 12,806
  • 9
  • 48
  • 94
2
votes
0 answers

Typescript and Next.js include another project's *source code* only from outside module root?

Summary I have a closed source Next.js site with Typescript. I'm trying to import a few React components from an external open source Next.js project (that I also own). I'm trying to do this in a way where node_modules are shared, or entirely from…
Andy Ray
  • 30,372
  • 14
  • 101
  • 138
2
votes
0 answers

Clang 15 doesn't have c++20 support?

Both Clang's documentation and cpp preference list that Clang has supported (most of) C++20 since Clang 10.0, and that one can enable such support with the -std=c++20 flag. However this seems to not be true, as I receive the following…
Peek
  • 23
  • 1
  • 4
2
votes
0 answers

What does --no-source-include do in NVRTC?

NVIDIA's run-time CUDA compilation library, NVRTC, supports the compilation flag --no-source-include. The documentation describes this flag as follows: The preprocessor by default adds the directory of each input sources to the include path. This…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
2
votes
0 answers

How do the `aapcs` and `aapcs-linux` ABI options differ when compiling for bare-metal ARM with gcc?

I am trying to port an application to ARM's arm-none-eabi-gcc toolchain. This application is intended to run on a bare-metal target. The only two suitable values for the -mabi option in this case appear to be aapcs and aapcs-linux. From Debian…
AJM
  • 1,317
  • 2
  • 15
  • 30
2
votes
0 answers

tsconfig why do I see compileOptions at so many places instead of compilerOptions

I am migrating a project from javascript to typescript and was reading several blogs to understand how could I go about doing that. I wonder why do so many blogs use compileOptions instead of compilerOptions. On the official guide/docs I only find…
Prakhar Agrawal
  • 1,002
  • 12
  • 21
2
votes
1 answer

What is the tsconfig equivalent for the cli parameter --generateTrace?

If you run tsc manually and use the param: tsc --generateTrace traceDir you can create a new traceDir directory with paired trace and types files. A recent analysis package from Microsoft typescript-analyze-trace can analyse those…
user3025289
2
votes
0 answers

What does it mean by the last dash in $(gcc -xc++ -E -v -)?

I often use the command gcc -xc++ -E -v - to check the system standard library's include paths. However, I don't understand what the last dash means. So, my question is: What does it mean by the last dash in gcc -xc++ -E -v -?
xmllmx
  • 39,765
  • 26
  • 162
  • 323
2
votes
1 answer

How come threaded perl (with usethreads) isn't set by default?

According to the INSTALL docs, On some platforms, perl can be compiled with support for threads. To enable this, run sh Configure -Dusethreads The default is to compile without thread support. With the thread implementation being pretty stable,…
Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
2
votes
1 answer

What do the input and output "languages" for the -x flag in GCC mean?

I am trying to compile a piece of code that was previously compiled with gfortran in ifort instead. The old compile line has a -xf95-cpp-input option in it that doesn't make sense to me. Looking in the GCC docs, it seems like the -x option tells…
Frank
  • 544
  • 2
  • 14