[ https://issues.apache.org/jira/browse/ARROW-15678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17526053#comment-17526053 ]
Antoine Pitrou commented on ARROW-15678: ---------------------------------------- So, currently we are doing something such as: {code} clang -c something_avx2.cc -mavx2 {code} An alternative would be not to pass the optimization flag on the command line but enable it selectively inside the source code, e.g.: {code} clang -c something_avx2.cc -DARROW_SPECIALIZED_SIMD_TARGET=avx2 {code} {code:c++} namespace parquet { namespace internal { namespace PARQUET_IMPL_NAMESPACE { #ifdef ARROW_SPECIALIZED_SIMD_TARGET #define STRINGIFY_EXPANDED(a) ARROW_STRINGIFY(a) #pragma clang attribute push (__attribute__((target( STRINGIFY_EXPANDED(ARROW_SPECIALIZED_SIMD_TARGET)) )), apply_to=function) #endif ... #ifdef ARROW_SPECIALIZED_SIMD_TARGET #pragma clang attribute pop #endif } // namespace PARQUET_IMPL_NAMESPACE } // namespace internal } // namespace parquet {code} > [C++][CI] a crossbow job with MinRelSize enabled > ------------------------------------------------ > > Key: ARROW-15678 > URL: https://issues.apache.org/jira/browse/ARROW-15678 > Project: Apache Arrow > Issue Type: Improvement > Components: C++, Continuous Integration > Reporter: Jonathan Keane > Assignee: Jonathan Keane > Priority: Blocker > Labels: pull-request-available > Fix For: 8.0.0 > > Time Spent: 11h 50m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.20.7#820007)