-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into issue-6416-breakpoints-do-not-get-triggere…
…d-in-golang-projects-running-c-extensions-via-cgo
- Loading branch information
Showing
26 changed files
with
318 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
7.3.2 | ||
7.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
clwb/tests/integrationtests/com/google/idea/blaze/clwb/LlvmToolchainTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.google.idea.blaze.clwb; | ||
|
||
import static com.google.common.truth.Truth.assertThat; | ||
import static com.google.idea.blaze.clwb.base.Assertions.assertContainsHeader; | ||
import static com.google.idea.blaze.clwb.base.Assertions.assertDefine; | ||
|
||
import com.google.idea.blaze.clwb.base.BazelVersionRule; | ||
import com.google.idea.blaze.clwb.base.ClwbIntegrationTestCase; | ||
import com.google.idea.blaze.clwb.base.OSRule; | ||
import com.intellij.util.system.OS; | ||
import com.jetbrains.cidr.lang.workspace.compiler.ClangCompilerKind; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.JUnit4; | ||
|
||
@RunWith(JUnit4.class) | ||
public class LlvmToolchainTest extends ClwbIntegrationTestCase { | ||
|
||
// llvm toolchain currently does not support windows, otherwise this test should be fine to run on windows | ||
@Rule | ||
public final OSRule osRule = new OSRule(OS.Linux, OS.macOS); | ||
|
||
// llvm toolchain currently only supports bazel 7+ | ||
@Rule | ||
public final BazelVersionRule bazelRule = new BazelVersionRule(7, 0); | ||
|
||
@Test | ||
public void testClwb() { | ||
final var errors = runSync(defaultSyncParams().build()); | ||
errors.assertNoErrors(); | ||
|
||
checkCompiler(); | ||
} | ||
|
||
private void checkCompiler() { | ||
final var compilerSettings = findFileCompilerSettings("main/hello-world.cc"); | ||
|
||
assertThat(compilerSettings.getCompilerKind()).isEqualTo(ClangCompilerKind.INSTANCE); | ||
assertDefine("__llvm__", compilerSettings).isNotEmpty(); | ||
assertDefine("__VERSION__", compilerSettings).startsWith("\"Clang 19.1.0"); | ||
|
||
assertContainsHeader("iostream", compilerSettings); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.