Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Change compiler flags


I am creating a plugin to make profiling with gprof more simple.

The plugin will use the following steps (please tell me if there are some better way to do it):

1) Get the compiler flags.

2) Add the -pg optimization if missing (both to the compiler and the linker)

3) Compile the project

4) Run the project

5) Run gprof to extract the profiler data

6) Change back the compiler flags.

I know how to do step 3, 4 and 5 but I have problems with step 1, 2 and 6.

I have tried using, IManagedBuildInfo buildInfo = ManagedBuildManager.getBuildInfo(project), but I can't get it to work as I want (I am using managed make).

Anyone got any tips or examples how to do this?



Back to the top