diff --git a/tools/profiles/develop.json b/tools/profiles/develop.json index cd05490bcb..f8626d86f9 100644 --- a/tools/profiles/develop.json +++ b/tools/profiles/develop.json @@ -15,7 +15,7 @@ "-Wl,-n"] }, "ARMC6": { - "common": ["-c", "--target=arm-arm-none-eabi", "-mthumb", "-Os", "-flto", + "common": ["-c", "--target=arm-arm-none-eabi", "-mthumb", "-Os", "-Wno-armcc-pragma-push-pop", "-Wno-armcc-pragma-anon-unions", "-Wno-reserved-user-defined-literal", "-Wno-deprecated-register", "-DMULADDC_CANNOT_USE_R7", "-fdata-sections", @@ -25,7 +25,7 @@ "c": ["-D__ASSERT_MSG", "-std=gnu11"], "cxx": ["-fno-rtti", "-std=gnu++14"], "ld": ["--show_full_path", "--legacyalign", "--any_contingency", - "--keep=os_cb_sections", "--lto", "--lto_level=Os"] + "--keep=os_cb_sections"] }, "ARM": { "common": ["-c", "--gnu", "-Ospace", "--split_sections", diff --git a/tools/profiles/extensions/lto.json b/tools/profiles/extensions/lto.json new file mode 100644 index 0000000000..59366afb32 --- /dev/null +++ b/tools/profiles/extensions/lto.json @@ -0,0 +1,6 @@ +{ + "ARMC6": { + "common": ["-flto"], + "ld": ["--lto", "--lto_level=Oz"] + } +} diff --git a/tools/profiles/release.json b/tools/profiles/release.json index 59576a23d1..5ab3a58d73 100644 --- a/tools/profiles/release.json +++ b/tools/profiles/release.json @@ -15,7 +15,7 @@ "-Wl,-n"] }, "ARMC6": { - "common": ["-c", "--target=arm-arm-none-eabi", "-mthumb", "-Oz", "-flto", + "common": ["-c", "--target=arm-arm-none-eabi", "-mthumb", "-Oz", "-Wno-armcc-pragma-push-pop", "-Wno-armcc-pragma-anon-unions", "-Wno-reserved-user-defined-literal", "-Wno-deprecated-register", "-DMULADDC_CANNOT_USE_R7", "-fdata-sections", @@ -25,7 +25,7 @@ "c": ["-D__ASSERT_MSG", "-std=gnu11"], "cxx": ["-fno-rtti", "-std=gnu++14"], "ld": ["--show_full_path", "--legacyalign", "--any_contingency", - "--keep=os_cb_sections", "--lto", "--lto_level=Oz"] + "--keep=os_cb_sections"] }, "ARM": { "common": ["-c", "--gnu", "-Ospace", "--split_sections",