kou commented on code in PR #39524:
URL: https://github.com/apache/arrow/pull/39524#discussion_r1445570375


##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -4848,6 +4848,9 @@ macro(build_awssdk)
     # Link time optimization is causing trouble like #34349
     string(REPLACE "-flto=auto" "" AWS_LC_C_FLAGS "${AWS_LC_C_FLAGS}")
     string(REPLACE "-ffat-lto-objects" "" AWS_LC_C_FLAGS "${AWS_LC_C_FLAGS}")
+    # Added by R with --enable/use-lto see #39523
+    string(REPLACE "-flto" "" AWS_LC_C_FLAGS "${AWS_LC_C_FLAGS}")
+    string(REPLACE "-flto=10" "" AWS_LC_C_FLAGS "${AWS_LC_C_FLAGS}")

Review Comment:
   Can we remove all `-flto*` flags?
   
   ```suggestion
       # "-flto" and "-flto=10" are added by R with --enable/use-lto see #39523
       string(REPLACE "-flto[^ ]*" "" AWS_LC_C_FLAGS "${AWS_LC_C_FLAGS}")
       string(REPLACE "-ffat-lto-objects" "" AWS_LC_C_FLAGS "${AWS_LC_C_FLAGS}")
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to