Fixes LTO/PGO options not being used when ccache is enabled.

When ccache is enabled, env["CC"] becomes - 'CC': '$CCACHE gcc'
This commit is contained in:
pentarctagon 2018-02-09 01:14:26 -06:00 committed by Jyrki Vesterinen
parent 8ddef4b902
commit c8200093b2

View file

@ -525,7 +525,7 @@ for env in [test_env, client_env, env]:
rel_comp_flags = rel_comp_flags + env["arch"]
# PGO and LTO setup
if env["CC"] == "gcc":
if "gcc" in env["TOOLS"]:
if env["pgo_data"] == "generate":
rel_comp_flags = rel_comp_flags + " -fprofile-generate=pgo_data/"
rel_link_flags = "-fprofile-generate=pgo_data/"