Coder Social home page Coder Social logo

Comments (2)

MaggieYingYi avatar MaggieYingYi commented on September 16, 2024

Commands for each step:

  1. Build llvm-repo/clang-repo toolchain with Release configuration.
% cd  ~/git/github/llvm-prepo
% tools/pstore/utils/make_build.py -DCAMKE_BUILD_TYPE=Release -o Release
  1. Modify the Makefile of ~/git/github/llvm-prepo/tools/pstore to compile the project only, no link.
    Build a static library, which is basically just a container for object files.
Modifications:
a) set (CMAKE_CXX_FLAGS_DEBUG  "-O0")
b) set (CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
c) change  add_pstore_executable to add_pstore_library
d) change add_pstore_unit_test to add_pstore_test_library
  1. Build pstore library using built llvm-repo/clang-repo compiler targeted on ELF, get the compile
    time.
change CMakefile targeted on ELF:   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -target x86_64-pc-linux-gnu-elf")

% cd  ~/git/github/llvm-prepo/tools/pstore
% utils/make_build.py -DCAMKE_BUILD_TYPE=Debug(/Release) -DCMAKE_C_COMPILER=~/git/github/llvm-prepo/Release/bin/clang -DCMAKE_C++_COMPILER=~/git/github/llvm-prepo/Release/bin/clang++ -o ELF_Debug(/ELF_Release)
% cd ELF_Debug(/ELF_Release)
% ninja clean
% /usr/bin/time -o time_report_for_elf.log ninja
  1. Build pstore library using built llvm-repo/clang-repo compiler targeted on Repo, get the compile
    time.
Change CMakefile targeted on Repo:  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -target x86_64-pc-linux-gnu-repo")

% cd  ~/git/github/llvm-prepo/tools/pstore
% utils/make_build.py -DCAMKE_BUILD_TYPE=Debug(/Release) -DCMAKE_C_COMPILER=~/git/github/llvm-prepo/Release/bin/clang -DCMAKE_C++_COMPILER=~/git/github/llvm-prepo/Release/bin/clang++ -o Repo_Debug(/Repo_Release)
% cd Repo_Debug(/Repo_Release)
% rm -f clang.db
% ninja clean
% /usr/bin/time -o time_report_for_repo_first_time.log ninja
  1. Build pstore library again and get the compile time.
% cd ~/git/github/llvm-prepo/tools/pstore/Repo_Debug(/Repo_Release)
% ninja clean
% /usr/bin/time -o time_report_for_repo_seond_time.log ninja

from llvm-prepo.

MaggieYingYi avatar MaggieYingYi commented on September 16, 2024

The detailed compile time has been given in https://github.com/SNSystems/llvm-prepo/wiki/Performance

from llvm-prepo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.