Questions tagged [compiler-flags]

Parameters that may be passed to a compiler affecting how compilation is carried out. These can have a variety of effects on the paths searched for external dependencies, optimization level, how source code is interpreted, code checks that are performed and preprocessor directives.

Parameters that may be passed to a compiler affecting how compilation is carried out. These can have a variety of effects on the paths searched for external dependencies, optimization level, how source code is interpreted, code checks that are performed and preprocessor directives.

479 questions
0
votes
2 answers

Global flag to revert to original logic in C

I've recently been asked by my supervisor to prepare a solution in which multiple pieces of logic throughout our application can be reverted back to an earlier piece of code while the application is live. In effect, I need to prepare something like…
Strata
  • 49
  • 1
  • 3
  • 9
0
votes
2 answers

ifort's real-size flag equivalent for C

Do gcc and cl have an equivalent for ifort real-size compiler flag? If not, what should I use instead? MACRO? #ifdef DOUBLE_PRECISION #define REAL double #else #define REAL float #endif REAL myvar;
Peter Petrik
  • 9,701
  • 5
  • 41
  • 65
0
votes
1 answer

-g flag changes runtime and compilation of program

I am writing a program that attempts to speed up a Top K filtering alogrithm using SSE and AVX SIMD instructions. I am compiling my program using icc with the flags -o3, -msse3, and -lrt, and the run-time comes out to ~30ms. However, when I put a…
0
votes
1 answer

Scons checking for compiler option

I want to check in Scons that my compiler support some option (for example -fcilkplus). The only way I manage to do it is the following sequence of operations: env.Prepend(CXXFLAGS = ['-fcilkplus'], LIBS = ['cilkrts']) Then I launch my custom…
hivert
  • 10,579
  • 3
  • 31
  • 56
0
votes
1 answer

Apportable -Is -fno-objc-arc supported

I have some files in my project which don't support ARC, hence the flag. Compiling for iOS works as intended, compiling with Apportable throws some errors (arc forbids explicit call for release). It seems like the flag is ignored. How can I fix…
0
votes
1 answer

Including static library and header Makefile questions (C)

My file stacking is as follows dir1/ mylib.a myheader.h file.c executable dir2/ dependentfile.c // depends on functions in myheader.h implemented in mylib.a I would like to link my static library file in my Makefile WITHOUT…
user2799712
  • 25
  • 1
  • 5
0
votes
1 answer

Does the flag -r8 in ifort affect the variables declared as real*4?

The ifort compiler describes the flag -r8 as: -r8 Makes default real and complex variables 8 bytes long. REAL declarations are treated as DOUBLE PRECISION (REAL(KIND=8)) and COMPLEX declarations are treated as …
Gabriel
  • 113
  • 5
0
votes
1 answer

arm64 flag like arc flag (-fno-objc-arc)

is there a opportunity to set a flag for specific files like the arc flag (-fno-objc-arc) in the compiler settings to use the 32bit lib instead of the 64bit lib? The thing is, that I use a class with some functions they doesn't work in 64bit.
Eike
  • 2,311
  • 20
  • 31
0
votes
1 answer

What is function splitting?

I need to optimize some code and I came across the term "function splitting" in the man page of ifort. When googled, I couldn't get any details regarding this kind of optimization. This is enabled by the compiler flag -fnsplit for ifort…
arunr
  • 59
  • 5
0
votes
0 answers

Callback functions in client dll of Citrix virtual channel are not called

I have the following problem: I've created client DLL with all needed callback functions (DriverOpen, DriverClose etc.). But they are not called, and I, actually, don't know why. Test dll vdping is working fine. May be the thing is I use VS2010 to…
Ov3r1oad
  • 1,057
  • 1
  • 12
  • 25
0
votes
3 answers

GCC Optimization Flags

I'm trying to get together a bunch of executables that have different optimizations run on them. My only question is, should gcc commands with -c also be able to use -O flags as well? I ask this, because I realize when I only place the…
user1642463
0
votes
2 answers

struct accessible without declaration?

I have the following Code #ifdef ENV_TI typedef struct timespecT { Uint32 tv_sec; Uint32 tv_nsec; }timespec; #endif #ifndef ENV_TI struct timespec currentTime; // This Line #else timespec currentTime; #endif How is the currentTime…
0
votes
1 answer

There is the right place to add -U__STRICT_ANSI__ to XCode build settings?

I try to add -U__STRICT_ANSI__ to my project build settings in XCode. But if I add it as "preprocessor macros" the commandline result is -DU__STRICT_ANSI__. XCode adds automatically "D". If I add it e.g. to OTHER_CPLUSPLUSFLAGS -> XCode ignores…
Monotomy
  • 554
  • 1
  • 6
  • 24
0
votes
2 answers

how to "export CFLAGS='my -flags -here' from python script

I'm writing a python program that needs to set the environment CFLAGS as needed. I'm using the subprocess module to perform some operations, but, I'm not sure this is the correct way of doing this. The script will first set the CFLAGS and then…
M0E-lnx
  • 717
  • 10
  • 24
0
votes
1 answer

Compiler flags in Eclipse

My build requires that I issue the following commands: $ g++ sniff.cpp -o sniff -lcrafter However, in my Eclipse build, all the complier gets is: g++ -o "sniffer_crafter" ./src/sniffer_crafter.o After getting these commands it complains that I…
amoeba
  • 95
  • 4
  • 17