Skip to content

Commit

Permalink
Respect user input if abi_generation_mode is explicitly provided in j…
Browse files Browse the repository at this point in the history
…ava_library (facebook#2467)
  • Loading branch information
davidhao3300 authored Jun 25, 2020
1 parent 75c67e4 commit 1c31c5b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/com/facebook/buck/jvm/java/DefaultJavaLibraryRules.java
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,15 @@ AbiGenerationMode getAbiGenerationMode() {
if (args != null) {
result = args.getAbiGenerationMode().orElse(null);
}
if (result == null) {
result = Objects.requireNonNull(getConfiguredCompilerFactory()).getAbiGenerationMode();

// Respect user input if provided
if (result != null) {
return result;
}

// Infer ABI generation mode based on properties of build target
result = Objects.requireNonNull(getConfiguredCompilerFactory()).getAbiGenerationMode();

if (result == AbiGenerationMode.CLASS) {
return result;
}
Expand Down

0 comments on commit 1c31c5b

Please sign in to comment.