Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't patch NDK source with Ollvm 14 #36

Open
ghost opened this issue Mar 15, 2023 · 0 comments
Open

Can't patch NDK source with Ollvm 14 #36

ghost opened this issue Mar 15, 2023 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 15, 2023

Describe the bug
I want to try to patch Ollvm 14 on NDK source instead LLVM source, but it fails

git apply ../ollvm14.patch -v

../ollvm14.patch:2558: trailing whitespace.
    
../ollvm14.patch:2741: trailing whitespace.
Copyright (c) 2014 Haute Ecole d'Ingénierie et de Gestion du Canton de Vaud (HEIG-VD). All rights reserved. 
../ollvm14.patch:2748: trailing whitespace.
    of the University of Applied Sciences and Arts Western Switzerland (HES-SO) 
../ollvm14.patch:2766: trailing whitespace.
    * Neither the names of the Obfuscator-LLVM Team, the Haute Ecole d'Ingénierie 
../ollvm14.patch:2767: trailing whitespace.
      et de Gestion du Canton de Vaud (HEIG-VD), the University of Applied Sciences 
Checking patch llvm/CMakeLists.txt...
Hunk #1 succeeded at 241 (offset -5 lines).
Checking patch llvm/CODE_OWNERS.TXT...
Checking patch llvm/include/llvm/InitializePasses.h...
Checking patch llvm/include/llvm/Transforms/Obfuscation/BogusControlFlow.h...
Checking patch llvm/include/llvm/Transforms/Obfuscation/CryptoUtils.h...
Checking patch llvm/include/llvm/Transforms/Obfuscation/Flattening.h...
Checking patch llvm/include/llvm/Transforms/Obfuscation/Split.h...
Checking patch llvm/include/llvm/Transforms/Obfuscation/StringObfuscation.h...
Checking patch llvm/include/llvm/Transforms/Obfuscation/Substitution.h...
Checking patch llvm/include/llvm/Transforms/Obfuscation/Utils.h...
Checking patch llvm/lib/Transforms/CMakeLists.txt...
Checking patch llvm/lib/Transforms/IPO/CMakeLists.txt...
Checking patch llvm/lib/Transforms/IPO/PassManagerBuilder.cpp...
Hunk #4 succeeded at 719 (offset -18 lines).
Hunk #5 succeeded at 755 (offset -18 lines).
error: while searching for:
  // flattening of blocks.
  MPM.add(createDivRemPairsPass());

  // LoopSink (and other loop passes since the last simplifyCFG) might have
  // resulted in single-entry-single-exit or empty blocks. Clean up the CFG.
  MPM.add(createCFGSimplificationPass(

error: patch failed: llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:991
error: llvm/lib/Transforms/IPO/PassManagerBuilder.cpp: patch does not apply
Checking patch llvm/lib/Transforms/Obfuscation/BogusControlFlow.cpp...
Checking patch llvm/lib/Transforms/Obfuscation/CMakeLists.txt...
Checking patch llvm/lib/Transforms/Obfuscation/CryptoUtils.cpp...
Checking patch llvm/lib/Transforms/Obfuscation/Flattening.cpp...
Checking patch llvm/lib/Transforms/Obfuscation/LICENSE-OBFUSCATOR.TXT...
Checking patch llvm/lib/Transforms/Obfuscation/LLVMBuild.txt...
Checking patch llvm/lib/Transforms/Obfuscation/SplitBasicBlocks.cpp...
Checking patch llvm/lib/Transforms/Obfuscation/StringObfuscation.cpp...
Checking patch llvm/lib/Transforms/Obfuscation/Substitution.cpp...
Checking patch llvm/lib/Transforms/Obfuscation/Utils.cpp...
void PassManagerBuilder::addLTOOptimizationPasses(legacy::PassManagerBase &PM) {
  // Load sample profile before running the LTO optimization pipeline.
  if (!PGOSampleUse.empty()) {
    PM.add(createPruneEHPass()); //This is line 991
    PM.add(createSampleProfileLoaderPass(PGOSampleUse));
  }

To Reproduce
I followed this tutorial how to clone NDK source https://bbs.kanxue.com/thread-271271.htm but I used NDK 25.2 source manifest_9352603.xml

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Linux Mint
  • Version: 21.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants