Post

Bazel跨平台编译

教程

B站视频

B站讲稿

官方教程

代码仓库

cpp

  1. stage1

    先编译

    1
    
     (base) PS C:\Users\yuy4o\Desktop\BazelTutorial\cpp-tutorial\stage1\main> bazel.exe build hello-world
    

    再运行

    1
    
     (base) PS C:\Users\yuy4o\Desktop\BazelTutorial\cpp-tutorial\stage1\bazel-bin\main> .\hello-world.exe
    
  2. stage2

    直接执行

    1
    
     (base) PS C:\Users\yuy4o\Desktop\BazelTutorial\cpp-tutorial\stage2> bazel run //main:hello-world
    
  3. stage3

    直接执行

    1
    
     (base) PS C:\Users\yuy4o\Desktop\BazelTutorial\cpp-tutorial\stage3> bazel run //main:hello-world
    

    清理生成文件

    1
    
     (base) PS C:\Users\yuy4o\Desktop\BazelTutorial\cpp-tutorial\stage3> bazel clean --expunge
    

java

1
(base) PS C:\Users\yuy4o\Desktop\BazelTutorial\java-tutorial> bazel run runner

gtest

1
(base) PS C:\Users\yuy4o\Desktop\BazelTutorial\main> bazel run hello_test
This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.