kou commented on issue #40635: URL: https://github.com/apache/arrow/issues/40635#issuecomment-2005307971
Passing `-O2` and `-O3` is intentional. We want to use `-O2` instead of `-O3`. Appending `-O2` is safer operation than replacing options string. (e.g. If we use replacing, we need to support `"-O3"`/`"... -O3"`/`"-O3 ..."`/... cases.) > When both `-O2` and `-O3` are passed, `clang` picks the higher level of optimization — `-O3`. Really? It seems that the later flag is used: ```console $ clang xxx.c -O3 && ls -la a.out -rwxr-xr-x 1 kou kou 16048 Mar 19 08:33 a.out $ clang xxx.c -O0 && ls -la a.out -rwxr-xr-x 1 kou kou 16080 Mar 19 08:33 a.out $ clang xxx.c -O0 -O3 $$ ls -la a.out -rwxr-xr-x 1 kou kou 16048 Mar 19 08:34 a.out $ clang xxx.c -O3 -O0 && ls -la a.out -rwxr-xr-x 1 kou kou 16080 Mar 19 08:34 a.out -- 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]
