Disable finstrument-functions option for included file

T

TQ Pham

Hi,

How can you disable finstrument-functions option for included files ?

For example:
I have A.cxx, which include B.hxx
I want to compile A with -finstrument-functions, but it always do the
same with all the functions which have declaration, and implementation
in B (some short, inline functions, for example).

So how can I apply -finstrument-functions to A only, not to B ?

Thank you in advance

TQ Pham
 
V

Victor Bazarov

TQ Pham said:
How can you disable finstrument-functions option for included files ?

What's "finstrument-functions"?
For example:
I have A.cxx, which include B.hxx
I want to compile A with -finstrument-functions, but it always do the
same with all the functions which have declaration, and implementation
in B (some short, inline functions, for example).

That's because to the compiler 'B.hxx' is not a separate file
to be compiled, it's a chunk of text to be merged with 'A.cxx'
for the purpose of compiling 'A.cxx'.
So how can I apply -finstrument-functions to A only, not to B ?

(a) I don't know what '-finstrument-functions' is (have you asked
the same question in a compiler-specific newsgroup?). I suspect
that it's a compiler command-line option. Any compiler switch
or option is off-topic here -- we discuss compiler-independent
language issues.

(b) You could try extracting relevant parts of B.cxx into a separate
source file and compile it separately.

BTW, what problem are you trying to solve with this? Maybe there is
a solution that doesn't involve "-finstrument-functions"...

Victor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,113
Messages
2,570,690
Members
47,269
Latest member
VitoYwo03

Latest Threads

Top